Package com.hierynomus.smbj.share
Class FileOutputStream.ByteArrayProvider
- java.lang.Object
-
- com.hierynomus.smbj.io.ByteChunkProvider
-
- com.hierynomus.smbj.share.FileOutputStream.ByteArrayProvider
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- FileOutputStream
private static class FileOutputStream.ByteArrayProvider extends ByteChunkProvider
-
-
Field Summary
Fields Modifier and Type Field Description private RingBufferbuf-
Fields inherited from class com.hierynomus.smbj.io.ByteChunkProvider
CHUNK_SIZE, chunkSize, offset
-
-
Constructor Summary
Constructors Modifier Constructor Description privateByteArrayProvider(int maxWriteSize, long offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytesLeft()protected intgetChunk(byte[] chunk)booleanisAvailable()booleanisBufferFull()booleanisBufferFull(int len)intmaxSize()voidprepareWrite(int maxBytesToPrepare)private voidreset()voidwriteByte(int b)voidwriteBytes(byte[] b, int off, int len)-
Methods inherited from class com.hierynomus.smbj.io.ByteChunkProvider
close, getChunkSize, getLastWriteSize, getOffset, writeChunk, writeChunk, writeChunks
-
-
-
-
Field Detail
-
buf
private RingBuffer buf
-
-
Method Detail
-
prepareWrite
public void prepareWrite(int maxBytesToPrepare)
- Specified by:
prepareWritein classByteChunkProvider
-
isAvailable
public boolean isAvailable()
- Specified by:
isAvailablein classByteChunkProvider
-
getChunk
protected int getChunk(byte[] chunk)
- Specified by:
getChunkin classByteChunkProvider
-
bytesLeft
public int bytesLeft()
- Specified by:
bytesLeftin classByteChunkProvider
-
writeBytes
public void writeBytes(byte[] b, int off, int len)
-
writeByte
public void writeByte(int b)
-
isBufferFull
public boolean isBufferFull()
-
isBufferFull
public boolean isBufferFull(int len)
-
maxSize
public int maxSize()
-
reset
private void reset()
-
-