Package com.hierynomus.smbj.io
Class FileByteChunkProvider
- java.lang.Object
-
- com.hierynomus.smbj.io.ByteChunkProvider
-
- com.hierynomus.smbj.io.FileByteChunkProvider
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class FileByteChunkProvider extends ByteChunkProvider
-
-
Field Summary
-
Fields inherited from class com.hierynomus.smbj.io.ByteChunkProvider
CHUNK_SIZE, chunkSize, offset
-
-
Constructor Summary
Constructors Constructor Description FileByteChunkProvider(java.io.File file)
FileByteChunkProvider(java.io.File file, long offset)
-
Method Summary
Modifier and Type Method Description int
bytesLeft()
void
close()
protected int
getChunk(byte[] chunk)
boolean
isAvailable()
void
prepareWrite(int maxBytesToPrepare)
-
Methods inherited from class com.hierynomus.smbj.io.ByteChunkProvider
getChunkSize, getLastWriteSize, getOffset, writeChunk, writeChunk, writeChunks
-
-
-
-
Method Detail
-
prepareWrite
public void prepareWrite(int maxBytesToPrepare)
- Specified by:
prepareWrite
in classByteChunkProvider
-
getChunk
protected int getChunk(byte[] chunk) throws java.io.IOException
- Specified by:
getChunk
in classByteChunkProvider
- Throws:
java.io.IOException
-
bytesLeft
public int bytesLeft()
- Specified by:
bytesLeft
in classByteChunkProvider
-
isAvailable
public boolean isAvailable()
- Specified by:
isAvailable
in classByteChunkProvider
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classByteChunkProvider
- Throws:
java.io.IOException
-
-