org.apache.axis.utils
public class ByteArray extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
bs_handle |
protected java.io.OutputStream |
bs_stream |
protected ByteArrayOutputStream |
cache |
protected long |
count |
protected static double |
DEFAULT_CACHE_INCREMENT |
protected static boolean |
DEFAULT_ENABLE_BACKING_STORE |
protected static int |
DEFAULT_RESIDENT_SIZE |
protected boolean |
enableBackingStore |
protected int |
max_size |
protected static int |
WORKING_BUFFER_SIZE |
| Constructor and Description |
|---|
ByteArray()
Constructor ByteArray
|
ByteArray(int max_resident_size)
Constructor ByteArray
|
ByteArray(int probable_size,
int max_resident_size)
Constructor ByteArray
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Method close
|
protected java.io.InputStream |
createBackingStoreInputStream()
Method createBackingStoreInputStream
|
protected void |
discardBackingStore()
Method discardBackingStore
|
void |
discardBuffer()
Method discardBuffer
|
protected void |
finalize()
Method finalize
|
void |
flush()
Method flush
|
java.lang.String |
getBackingStoreFileName()
Method getBackingStoreFileName
|
static double |
getDEFAULT_CACHE_INCREMENT() |
static int |
getDEFAULT_RESIDENT_SIZE() |
protected void |
increaseCapacity(int count)
Method increaseCapacity
|
static boolean |
isDEFAULT_ENABLE_BACKING_STORE() |
boolean |
isEnableBackingStore() |
protected java.io.InputStream |
makeInputStream()
Method makeInputStream
|
static void |
setDEFAULT_CACHE_INCREMENT(double DEFAULT_CACHE_INCREMENT) |
static void |
setDEFAULT_ENABLE_BACKING_STORE(boolean DEFAULT_ENABLE_BACKING_STORE) |
static void |
setDEFAULT_RESIDENT_SIZE(int DEFAULT_RESIDENT_SIZE) |
void |
setEnableBackingStore(boolean enableBackingStore) |
long |
size()
Method size
|
protected void |
switchToBackingStore()
Method switchToBackingStore
|
byte[] |
toByteArray()
Method toByteArray
|
void |
write(byte[] bytes)
Method write
|
void |
write(byte[] bytes,
int start,
int length)
Method write
|
void |
write(int b)
Method write
|
void |
writeTo(java.io.OutputStream os)
Method writeTo
|
protected static double DEFAULT_CACHE_INCREMENT
protected static int DEFAULT_RESIDENT_SIZE
protected static boolean DEFAULT_ENABLE_BACKING_STORE
protected static int WORKING_BUFFER_SIZE
protected ByteArrayOutputStream cache
protected int max_size
protected java.io.File bs_handle
protected java.io.OutputStream bs_stream
protected long count
protected boolean enableBackingStore
public ByteArray()
public ByteArray(int max_resident_size)
max_resident_size - public ByteArray(int probable_size,
int max_resident_size)
probable_size - max_resident_size - public boolean isEnableBackingStore()
public void setEnableBackingStore(boolean enableBackingStore)
public static boolean isDEFAULT_ENABLE_BACKING_STORE()
public static void setDEFAULT_ENABLE_BACKING_STORE(boolean DEFAULT_ENABLE_BACKING_STORE)
public static int getDEFAULT_RESIDENT_SIZE()
public static void setDEFAULT_RESIDENT_SIZE(int DEFAULT_RESIDENT_SIZE)
public static double getDEFAULT_CACHE_INCREMENT()
public static void setDEFAULT_CACHE_INCREMENT(double DEFAULT_CACHE_INCREMENT)
public void write(byte[] bytes)
throws java.io.IOException
write in class java.io.OutputStreambytes - java.io.IOExceptionpublic void write(byte[] bytes,
int start,
int length)
throws java.io.IOException
write in class java.io.OutputStreambytes - start - length - java.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic long size()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionprotected void increaseCapacity(int count)
throws java.io.IOException
count - java.io.IOExceptionpublic void discardBuffer()
protected java.io.InputStream makeInputStream()
throws java.io.IOException,
java.io.FileNotFoundException
java.io.IOExceptionjava.io.FileNotFoundExceptionprotected void finalize()
finalize in class java.lang.Objectprotected void switchToBackingStore()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getBackingStoreFileName()
throws java.io.IOException
java.io.IOExceptionprotected void discardBackingStore()
protected java.io.InputStream createBackingStoreInputStream()
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic byte[] toByteArray()
throws java.io.IOException
java.io.IOExceptionpublic void writeTo(java.io.OutputStream os)
throws java.io.IOException
os - java.io.IOExceptionCopyright ? 2005 Apache Web Services Project. All Rights Reserved.