public final static DataWriter createDataWriter ( File file , IOType type ) { if ( type == IOType . MAPPED ) { if ( file . length ( ) <= Integer . MAX_VALUE ) { return new MappedWriter ( file ) ; } else { return new MultiMappedWriter ( file ) ; } } else { return new ChannelWriter ( file ) ; } }
Creates a new DataWriter to write to a file .