Java 读取一个二进制文件
发布网友
发布时间:2022-05-26 18:46
我来回答
共1个回答
热心网友
时间:2023-10-18 02:36
//you read data code
File obfile = new File("test.dat");//二进制文件名:test.dat
BufferedInputStream instream;
try {
instream = new BufferedInputStream(new FileInputStream(obfile));
try {
instream.read(data, 2, 23);
instream.close();
} catch (IOException ex) {
}
} catch (FileNotFoundException ex) {
}