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);
        }
    }
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.

@param file - file to write.
@param type - I/O type.
@return a new DataWriter instance of type {@link BasicIO}.