* @throws IOException
*/
public static Datatype readFileType(File file) throws IOException {
- BinaryFile rf = new BinaryFile( file );
+ BinaryFile rf = new BinaryFile( file, "r" );
try {
Binding datatype_binding = Bindings.getBindingUnchecked( Datatype.class );
return (Datatype) Bindings.getSerializerUnchecked( datatype_binding ).deserialize( rf );
* @throws IOException
*/
public static Object readFile(File file, Binding binding) throws IOException {
- BinaryFile rf = new BinaryFile( file );
+ BinaryFile rf = new BinaryFile( file, "r" );
try {
Binding datatype_binding = Bindings.getBindingUnchecked( Datatype.class );
Datatype type = (Datatype) Bindings.getSerializerUnchecked( datatype_binding ).deserialize( rf );
* @throws IOException
*/
public static void readFile(File file, RecordBinding binding, Object dst) throws IOException {
- BinaryFile rf = new BinaryFile( file );
+ BinaryFile rf = new BinaryFile( file, "r" );
try {
Binding datatype_binding = Bindings.getBindingUnchecked( Datatype.class );
Datatype type = (Datatype) Bindings.getSerializerUnchecked( datatype_binding ).deserialize( rf );
public static DataInput openInput( File file ) throws IOException
{
- return new BinaryFile(file);
+ return new BinaryFile(file, "r");
}
public static DataInput openInput( byte[] data )