Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Java Binary data file
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Akash Rana
Java Binary data file
0 Answer(s)      4 years and 9 months ago
Posted in : Java Beginners


Hi,

I have a binary data file(binfile.data) and the file has what is commonly referred to as variable length records.Specifically the format of the file is:

HEADER SECTION//RECORD
----------------------
----------------------
DATA SECTIONS//RECORDS


The DATA is made up of four main sections:

-some number of consecutive int values
-some number of consecutive long values
-some number of consecutive float values
-some number of consecutive double values

The HEADER section is formed as four consecutive integer:

1 number of ints in 1st data section
2 number of longs in 2nd data section
3 number of floats in 3rd data section
4 number of doubles in 4th data section

Now I have to count number of ints,longs,floats and doubles in the binary file.I have to do this using java.I tried to figure out the correct solution but still having some problems.

Can anyone help?

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Java Binary data file - Java Beginners
Java Binary data file  Hi, I have a binary data file(binfile.data) and the file has what is commonly referred to as variable length records.Specifically the format of the file is: HEADER SECTION//RECORD
Java read binary file
Java read binary file  I want Java read binary file example code... at Reading binary file into byte array in Java. Thanks   Hi, There is many more examples at Java File - Learn how to handle files in Java with Examples
Advertisements
java binary file io example
java binary file io example  java binary file io example
Java File Binary
Java File Binary In this section, you will learn how to write numeric data into the binary file. Description of code: Numeric data converts compactly... primitive data into the file. Here is the code: import java.io.*; public
How to write in Binary file in Java programming language
How to write in Binary file in Java programming language  I need some help about Java programming. Please explain me "How to write in Binary file in Java programming language
Reading binary file into byte array in Java
Example code of reading binary file into byte array in Java This example shows you how to read a binary file into byte array from Java program. This type... and use the byte array data for further processing. To the binary file into byte
Java Write To File Binary
Java Write To File Binary In this tutorial you will learn how to write to binary file. A binary file is a file into which the bit patterns of mostly data types can be formed to a byte of 8 bits. Write to a binary file in java
Writing to and reading from a binary file in java.
Writing to and reading from a binary file in java.  I have written the following code to convert an ASCII text file to a binary file: public static... the binary file from another program as follows: m_dis = new DataInputStream
Parsing Binary Data in PHP - PHP
Parsing Binary Data in PHP  Is there a better library for working with binary data in PHP
send Binary Data by doGet or doPost?
send Binary Data by doGet or doPost?  which method in doGet or doPost is use to send binary date to server
Binary Search - Java Beginners
Binary Search  how to use Binary think in java give me the Binary Search programm thx
Retrive data from database and perform binary tree operations on that data in jsp or java
Retrive data from database and perform binary tree operations on that data in jsp or java  To develop code for MLM project. I want to retrieve data from database dynamically and perform operations on that. Just like calculate
parse a file into primitive binary format
parse a file into primitive binary format  Hi, I need help converting an audio file or any other file to its primitive binarty format, and when I read the inputstream I find it some integers and I don't know its binary
BINARY TO DECIMAL - Java Beginners
BINARY TO DECIMAL  HELP ME PLSS. PROGRAM THAT CONVERTS BINARY TO DECIMAL  Hi friend, Program to convert Binary To Decimal : import... (System.in); System.out.print ("Enter a binary number "); String str
JAVA: Recusrion, Binary Search
JAVA: Recusrion, Binary Search  I want to learn about Binary Search... and restored to/from a file. For all the search functionalities you are to implement it using a recursive implementation of Binary Search. For the cases when more than
binary search - Java Beginners
binary search  Write a java program to search an array by using recursive binary search.  /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package
Binary to decimal - Java Beginners
Binary to decimal  Need help pls.. i cannot run this program... pls... = Integer.parseInt(JOptionPane.showInputDialog("Input Binary:")); String c = args[0...; String value = JOptionPane.showInputDialog("Input Binary"); int len
binary search tree from text file
binary search tree from text file  How so I go about constructing a binary search tree from a text file, which has letters and numbers, which must be sorted and printed in ascending order. E.g. Text file contents 3 apples pears
Java binary to decimal
Java binary to decimal       This Tutorial helps you to know the code for Java binary... you in understanding a how to get a 'Java binary to decimal'. For this we have
Binary Search!!! - Java Beginners
Binary Search!!!  Hi Sir, My question is quite simple. im only getting "ArrayIndexOutOfBoundsException : 10" in the if statement which is inside the 1st while loop. How can i get rid of it? The if statement is btw
pass data from java frame to file
pass data from java frame to file  i want to write the data to file, and data must be copy from java frame java frame contains 7-8 labels n below that 1 table. i want store all this data to 1 file. plz help me
java program to insert data into a file and count the number of words from the file???????
java program to insert data into a file and count the number of words from the file???????  java program to insert data into a file and count the number of words from the file
Convert integer type data into binary, octal and hexadecimal
Convert integer type data into binary, octal and hexadecimal... will learn how to convert an integer type data into binary, octal and hexadecimal... into these. toBinaryString() method converts integer type data into binary
binary
binary  Hi I want to write a program in pascal that ask a user to input a decimal number and then return its binary equivalent in the minimum number of bits required to repesent the number. Thks
Fetching the exact data from file using java
Fetching the exact data from file using java  **hi ... i am having one .lst file.. that file consists of instructions and opcodes.. now i want to fetch only the opcode from that file.. could u pls anyone guide me this using java
Java Array Binary Search example
Java Array Binary Search It is a method for searching the array element... example demonstrates how to do a binary search on the Java array object... the binary search algorithm.  It returns the index of the found element
how to store data in a text file - Java Beginners
how to store data in a text file  Hi friends, I want to know, how we can save the data in a .txt file using swings....... for example, i want to store the arraylist data of swing program into a text file.......and also i want
binary distributions - Java Server Faces Questions
binary distributions  what are binary distributions
How to using Binary Search Array Java ?
How to using Binary Search Array Java ?  Hi, I am beginners in Java... functions. The problem is that how to use binary search array in Java. Please give any online reference show that i will implement the binary search array in Java
Inserting data in Excel File - Java Beginners
Inserting data in Excel File  Dear Sir, How can we fill the excel with fetched data from the database like Oracle, DB2? Is it possible to create an excel with filled data? Kindly give me the solutions to questions
Convert Binary to Hexadecimal
;  In this section, you will learn to convert binary data... the binary data into hexadecimal.  Description of the program: This program takes a binary data from user, which is a string type that is  converted
Advertisements
 

 

 

DMCA.com