怎么通过java将dat二进制文件中的数据提取出来

怎样通过java将dat二进制文件中的数据提取出来?
现在有一个dat文件是以二进制存储的。里面的内容格式我现在知道。我想用java来解析出来.我现在已经将dat文件读取到byte数组中了。但是转换成String时是乱码。请各位大神帮忙!代码如下:
public void parseOneFile(File file) {
try {
/**
* 读取文件流
*/
InputStream inputStream = new FileInputStream(file);
/**
* 缓冲流
*/
BufferedInputStream bufferedInputStream = new BufferedInputStream(
inputStream);
/**
* 字节数组
*/
byte[] filebyte = null;
/**
* 读入文件的字节长度
*/
long filelength = file.length();
if (filelength > Integer.MAX_VALUE) {
logger.info("the file is too large!");
return;
}
/**
* 初始化
*/
filebyte = new byte[(int) filelength];
try {
/**
* 读取的起始值
*/
int offset = 0;
/**
* 读取的字节数
*/
int numRead = 0;
while (offset < filebyte.length
&& (numRead = bufferedInputStream.read(filebyte,
offset, filebyte.length - offset)) >= 0) {
offset += numRead;
}
if (offset < filebyte.length) {
throw new IOException(
"Could not completely read file "
+ file.getName());
}
String temp=new String(filebyte,"GB2312");
System.out.println(temp);

} catch (IOException e) {
logger.error("read file error!", e);
}
} catch (FileNotFoundException e) {
logger.error("file is not found!", e);
}
}

------解决方案--------------------
这几天也遇到同样的问题,先帮顶下。

据说是 
C++写入的字节顺序是从低到高(左低到右高),
而java.io.DataInputStream读取的数据是从高到低(左高到右低) 后来也以为了但是出来转出来的同样也是乱码!!