@Deprecated
public class RestrictedByteArrayCacheOutputStream
extends java.io.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 java.io.OutputStream |
outputStream
Deprecated.
|
protected boolean |
overflowed
Deprecated.
|
| Constructor and Description |
|---|
RestrictedByteArrayCacheOutputStream(java.io.OutputStream outputStream,
int initialCacheSize,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
Deprecated.
|
RestrictedByteArrayCacheOutputStream(java.io.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.
|
java.nio.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 java.io.OutputStream outputStream
protected boolean overflowed
public RestrictedByteArrayCacheOutputStream(java.io.OutputStream outputStream,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
public RestrictedByteArrayCacheOutputStream(java.io.OutputStream outputStream,
int initialCacheSize,
int cacheCapacity,
RestrictedByteArrayCacheOutputStream.FlushPreAction flushPreAction)
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic int getCacheCapacity()
public boolean isOverflowed()
public void reset()
public int size()
public byte[] toByteArray()
public byte[] unsafeGetByteArray()
public java.nio.ByteBuffer unsafeGetByteBuffer()
public void write(byte[] bytes)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] bytes,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionprotected void ensureCacheSize(int newIndex)