public interface BufferChannel extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
BlockAccess,
FileChannel| Modifier and Type | Method and Description |
|---|---|
BufferChannel |
duplicate()
Return another channel to the same storage but with independent position.
|
String |
getFilename()
Filename for this BufferChannel (maybe null)
|
String |
getLabel()
useful display string
|
boolean |
isEmpty()
Is it empty?
|
long |
position()
return the position
|
void |
position(long pos)
set the position
|
int |
read(ByteBuffer buffer)
Read into a ByteBuffer.
|
int |
read(ByteBuffer buffer,
long loc)
Read into a ByteBuffer, starting at position loc.
|
long |
size()
Length of storage, in bytes.
|
void |
truncate(long size)
Truncate the file.
|
int |
write(ByteBuffer buffer)
Write from ByteBuffer, starting at the current position.
|
int |
write(ByteBuffer buffer,
long loc)
Write from ByteBuffer, starting at position loc.
|
synccloseBufferChannel duplicate()
long position()
void position(long pos)
int read(ByteBuffer buffer)
int read(ByteBuffer buffer, long loc)
int write(ByteBuffer buffer)
int write(ByteBuffer buffer, long loc)
void truncate(long size)
FileChannel.truncate(long)long size()
boolean isEmpty()
String getLabel()
String getFilename()
Licensed under the Apache License, Version 2.0