Package com.hierynomus.smbj.io
Class ByteChunkProvider
- java.lang.Object
-
- com.hierynomus.smbj.io.ByteChunkProvider
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
ArrayByteChunkProvider
,BufferByteChunkProvider
,EmptyByteChunkProvider
,FileByteChunkProvider
,InputStreamByteChunkProvider
public abstract class ByteChunkProvider extends java.lang.Object implements java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
CHUNK_SIZE
protected int
chunkSize
protected long
offset
-
Constructor Summary
Constructors Constructor Description ByteChunkProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
bytesLeft()
void
close()
protected abstract int
getChunk(byte[] chunk)
int
getLastWriteSize()
long
getOffset()
abstract boolean
isAvailable()
void
writeChunk(Buffer<?> buffer)
void
writeChunk(java.io.OutputStream os)
void
writeChunks(Buffer<?> buffer, int nrChunks)
-
-
-
Field Detail
-
CHUNK_SIZE
protected static final int CHUNK_SIZE
- See Also:
- Constant Field Values
-
offset
protected long offset
-
chunkSize
protected int chunkSize
-
-
Method Detail
-
isAvailable
public abstract boolean isAvailable()
-
writeChunk
public void writeChunk(java.io.OutputStream os)
-
writeChunks
public void writeChunks(Buffer<?> buffer, int nrChunks)
-
writeChunk
public void writeChunk(Buffer<?> buffer)
-
getOffset
public long getOffset()
-
getLastWriteSize
public int getLastWriteSize()
-
getChunk
protected abstract int getChunk(byte[] chunk) throws java.io.IOException
- Throws:
java.io.IOException
-
bytesLeft
public abstract int bytesLeft()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-