public RandomAccessFileBuffer(File file) throws FileNotFoundException { super(READWRITE,true); assert file.length()<=Integer.MAX_VALUE; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); _capacity=Integer.MAX_VALUE; setGetIndex(0); setPutIndex((int)file.length()); }
len = ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); if (len>0) buffer.skip(len);
len = ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); if (len>0) buffer.skip(len);
public RandomAccessFileBuffer(File file) throws FileNotFoundException { super(READWRITE,true); assert file.length()<=Integer.MAX_VALUE; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); _capacity=Integer.MAX_VALUE; setGetIndex(0); setPutIndex((int)file.length()); }
len = ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); if (len>0) buffer.skip(len);
public RandomAccessFileBuffer(File file) throws FileNotFoundException { super(READWRITE,true); assert file.length()<=Integer.MAX_VALUE; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); _capacity=Integer.MAX_VALUE; setGetIndex(0); setPutIndex((int)file.length()); }
len = ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); if (len>0) buffer.skip(len);
public RandomAccessFileBuffer(File file) throws FileNotFoundException { super(READWRITE,true); assert file.length()<=Integer.MAX_VALUE; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); _capacity=Integer.MAX_VALUE; setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity,int access) throws FileNotFoundException { super(access,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,access==READWRITE?"rw":"r"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity) throws FileNotFoundException { super(READWRITE,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity,int access) throws FileNotFoundException { super(access,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,access==READWRITE?"rw":"r"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity) throws FileNotFoundException { super(READWRITE,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity) throws FileNotFoundException { super(READWRITE,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity) throws FileNotFoundException { super(READWRITE,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,"rw"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity,int access) throws FileNotFoundException { super(access,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,access==READWRITE?"rw":"r"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }
public RandomAccessFileBuffer(File file,int capacity,int access) throws FileNotFoundException { super(access,true); assert capacity>=file.length(); assert file.length()<=Integer.MAX_VALUE; _capacity=capacity; _file = new RandomAccessFile(file,access==READWRITE?"rw":"r"); _channel=_file.getChannel(); setGetIndex(0); setPutIndex((int)file.length()); }