public class NIOSequentialFile extends AbstractSequentialFile
AbstractSequentialFile.DelegateCallback, AbstractSequentialFile.LocalBufferObserverfactory, fileSize, position, timedBuffer, timedBufferObserver, writerExecutor| Constructor and Description |
|---|
NIOSequentialFile(SequentialFileFactory factory,
File file,
int maxIO,
Executor writerExecutor) |
NIOSequentialFile(SequentialFileFactory factory,
String directory,
String fileName,
int maxIO,
Executor writerExecutor) |
| Modifier and Type | Method and Description |
|---|---|
int |
calculateBlockStart(int position) |
SequentialFile |
cloneFile() |
void |
close() |
void |
fill(int position,
int size,
byte fillCharacter) |
int |
getAlignment() |
boolean |
isOpen() |
protected ByteBuffer |
newBuffer(int size,
int limit) |
void |
open()
this.maxIO represents the default maxIO.
|
void |
open(int maxIO,
boolean useExecutor)
The maximum number of simultaneous writes accepted
|
void |
position(long pos) |
int |
read(ByteBuffer bytes) |
int |
read(ByteBuffer bytes,
IOAsyncTask callback) |
long |
size() |
void |
sync() |
String |
toString() |
void |
waitForClose() |
void |
writeDirect(ByteBuffer bytes,
boolean sync)
Write directly to the file without using any buffer
|
void |
writeDirect(ByteBuffer bytes,
boolean sync,
IOAsyncTask callback)
Write directly to the file without using any buffer
|
void |
writeInternal(ByteBuffer bytes)
Write directly to the file.
|
copyTo, delete, exists, fits, getFile, getFileName, position, renameTo, setTimedBuffer, write, write, write, writepublic NIOSequentialFile(SequentialFileFactory factory, String directory, String fileName, int maxIO, Executor writerExecutor)
public NIOSequentialFile(SequentialFileFactory factory, File file, int maxIO, Executor writerExecutor)
public int getAlignment()
public boolean isOpen()
public void open()
throws Exception
Exceptionpublic void open(int maxIO,
boolean useExecutor)
throws Exception
SequentialFileExceptionpublic void fill(int position,
int size,
byte fillCharacter)
throws Exception
Exceptionpublic void close()
throws Exception
close in interface SequentialFileclose in class AbstractSequentialFileExceptionpublic int read(ByteBuffer bytes) throws Exception
Exceptionpublic int read(ByteBuffer bytes, IOAsyncTask callback) throws Exception
Exceptionpublic void position(long pos)
throws Exception
position in interface SequentialFileposition in class AbstractSequentialFileExceptionpublic SequentialFile cloneFile()
public void writeDirect(ByteBuffer bytes, boolean sync, IOAsyncTask callback)
SequentialFilepublic void writeDirect(ByteBuffer bytes, boolean sync) throws Exception
SequentialFileExceptionpublic void writeInternal(ByteBuffer bytes) throws Exception
SequentialFileExceptionprotected ByteBuffer newBuffer(int size, int limit)
newBuffer in class AbstractSequentialFileCopyright © 2012 JBoss by Red Hat. All Rights Reserved.