@Deprecated
public class RestrictedByteArrayCacheOutputStream
extends OutputStream
| Modifier and Type | Class and Description |
|---|---|
static interface |
RestrictedByteArrayCacheOutputStream.FlushPreAction
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
cache
Deprecated.
|
protected int |
cacheCapacity
Deprecated.
|
protected RestrictedByteArrayCacheOutputStream.FlushPreAction |
flushPreAction
Deprecated.
|
protected int |
index
Deprecated.
|
protected OutputStream |
outputStream
Deprecated.
|
protected boolean |
overflowed
Deprecated.
|
| Constructor and Description |
|---|
RestrictedByteArrayCacheOutputStream(OutputStream outputStream,
int initialCacheSize,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
Deprecated.
|
RestrictedByteArrayCacheOutputStream(OutputStream outputStream,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureCacheSize(int newIndex)
Deprecated.
|
void |
flush()
Deprecated.
|
int |
getCacheCapacity()
Deprecated.
|
boolean |
isOverflowed()
Deprecated.
|
void |
reset()
Deprecated.
|
int |
size()
Deprecated.
|
byte[] |
toByteArray()
Deprecated.
|
byte[] |
unsafeGetByteArray()
Deprecated.
|
ByteBuffer |
unsafeGetByteBuffer()
Deprecated.
|
void |
write(byte[] bytes)
Deprecated.
|
void |
write(byte[] bytes,
int offset,
int length)
Deprecated.
|
void |
write(int b)
Deprecated.
|
protected byte[] cache
protected int cacheCapacity
protected RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction
protected int index
protected OutputStream outputStream
protected boolean overflowed
public RestrictedByteArrayCacheOutputStream(OutputStream outputStream,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
public RestrictedByteArrayCacheOutputStream(OutputStream outputStream,
int initialCacheSize,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic int getCacheCapacity()
public boolean isOverflowed()
public void reset()
public int size()
public byte[] toByteArray()
public byte[] unsafeGetByteArray()
public ByteBuffer unsafeGetByteBuffer()
public void write(byte[] bytes)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] bytes,
int offset,
int length)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionprotected void ensureCacheSize(int newIndex)