binaryfiles - How can I read binary file in java which is written in c# -
i have read binary file written in c#. , know file format. want learn if possible. , how can if possible.
your question ambiguous, i'll assume you're asking "how read binary file?" in case, answer use fileinputstream
read bytes. if know filepath, can use code below read bytes file:
byte[] readbytes(string filepath) { file file = new file(filepath); fileinputstream stream = new fileinputstream(file); // create buffer of correct size byte[] buffer = new byte[file.length()]; // read in data stream.read(buffer); return buffer; }
Comments
Post a Comment