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 intprotected intprivate intprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intvoidclose()protected abstract intgetChunk(byte[] chunk) intintlongabstract booleanabstract voidprepareWrite(int maxBytesToPrepare) voidwriteChunk(Buffer<?> buffer) voidvoidwriteChunks(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-