Package com.hierynomus.smbj.io
Class ByteChunkProvider
java.lang.Object
com.hierynomus.smbj.io.ByteChunkProvider
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ArrayByteChunkProvider
,BufferByteChunkProvider
,CachingByteChunkProvider
,EmptyByteChunkProvider
,FileByteChunkProvider
,FileOutputStream.ByteArrayProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected int
private int
protected long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
void
close()
protected abstract int
getChunk
(byte[] chunk) int
int
long
abstract boolean
abstract void
prepareWrite
(int maxBytesToPrepare) void
writeChunk
(Buffer<?> buffer) void
void
writeChunks
(Buffer<?> buffer, int nrChunks)
-
Field Details
-
CHUNK_SIZE
protected static final int CHUNK_SIZE- See Also:
-
offset
protected long offset -
chunkSize
protected int chunkSize -
lastWriteSize
private int lastWriteSize
-
-
Constructor Details
-
ByteChunkProvider
public ByteChunkProvider()
-
-
Method Details
-
isAvailable
public abstract boolean isAvailable() -
prepareWrite
public abstract void prepareWrite(int maxBytesToPrepare) -
writeChunk
-
writeChunks
-
writeChunk
-
getChunkSize
public int getChunkSize() -
getOffset
public long getOffset() -
getLastWriteSize
public int getLastWriteSize() -
getChunk
- Throws:
IOException
-
bytesLeft
public abstract int bytesLeft() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-