Package com.hierynomus.smbj.io
Class ByteBufferByteChunkProvider
- java.lang.Object
-
- com.hierynomus.smbj.io.ByteChunkProvider
-
- com.hierynomus.smbj.io.ByteBufferByteChunkProvider
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ByteBufferByteChunkProvider extends ByteChunkProvider
-
-
Field Summary
-
Fields inherited from class com.hierynomus.smbj.io.ByteChunkProvider
CHUNK_SIZE, chunkSize, offset
-
-
Constructor Summary
Constructors Constructor Description ByteBufferByteChunkProvider(java.nio.ByteBuffer buffer)ByteBufferByteChunkProvider(java.nio.ByteBuffer buffer, long fileOffset)
-
Method Summary
Modifier and Type Method Description intbytesLeft()voidclose()protected intgetChunk(byte[] chunk)booleanisAvailable()voidprepareWrite(int maxBytesToPrepare)-
Methods inherited from class com.hierynomus.smbj.io.ByteChunkProvider
getChunkSize, getLastWriteSize, getOffset, writeChunk, writeChunk, writeChunks
-
-
-
-
Method Detail
-
isAvailable
public boolean isAvailable()
-
prepareWrite
public void prepareWrite(int maxBytesToPrepare)
- Specified by:
prepareWritein classByteChunkProvider
-
getChunk
protected int getChunk(byte[] chunk) throws java.io.IOException- Specified by:
getChunkin classByteChunkProvider- Throws:
java.io.IOException
-
bytesLeft
public int bytesLeft()
- Specified by:
bytesLeftin classByteChunkProvider
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classByteChunkProvider- Throws:
java.io.IOException
-
-