Package org.apache.axis.utils
Class ByteArray
java.lang.Object
java.io.OutputStream
org.apache.axis.utils.ByteArray
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Class ByteArray
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected OutputStreamprotected ByteArrayOutputStreamprotected longprotected static doubleprotected static booleanprotected static intprotected booleanprotected intprotected static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Method closeprotected InputStreamMethod createBackingStoreInputStreamprotected voidMethod discardBackingStorevoidMethod discardBufferprotected voidfinalize()Method finalizevoidflush()Method flushMethod getBackingStoreFileNamestatic doublestatic intprotected voidincreaseCapacity(int count) Method increaseCapacitystatic booleanbooleanprotected InputStreamMethod makeInputStreamstatic voidsetDEFAULT_CACHE_INCREMENT(double DEFAULT_CACHE_INCREMENT) static voidsetDEFAULT_ENABLE_BACKING_STORE(boolean DEFAULT_ENABLE_BACKING_STORE) static voidsetDEFAULT_RESIDENT_SIZE(int DEFAULT_RESIDENT_SIZE) voidsetEnableBackingStore(boolean enableBackingStore) longsize()Method sizeprotected voidMethod switchToBackingStorebyte[]Method toByteArrayvoidwrite(byte[] bytes) Method writevoidwrite(byte[] bytes, int start, int length) Method writevoidwrite(int b) Method writevoidwriteTo(OutputStream os) Method writeToMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
DEFAULT_CACHE_INCREMENT
protected static double DEFAULT_CACHE_INCREMENT -
DEFAULT_RESIDENT_SIZE
protected static int DEFAULT_RESIDENT_SIZE -
DEFAULT_ENABLE_BACKING_STORE
protected static boolean DEFAULT_ENABLE_BACKING_STORE -
WORKING_BUFFER_SIZE
protected static int WORKING_BUFFER_SIZE -
cache
-
max_size
protected int max_size -
bs_handle
-
bs_stream
-
count
protected long count -
enableBackingStore
protected boolean enableBackingStore
-
-
Constructor Details
-
ByteArray
public ByteArray()Constructor ByteArray -
ByteArray
public ByteArray(int max_resident_size) Constructor ByteArray- Parameters:
max_resident_size-
-
ByteArray
public ByteArray(int probable_size, int max_resident_size) Constructor ByteArray- Parameters:
probable_size-max_resident_size-
-
-
Method Details
-
isEnableBackingStore
public boolean isEnableBackingStore() -
setEnableBackingStore
public void setEnableBackingStore(boolean enableBackingStore) -
isDEFAULT_ENABLE_BACKING_STORE
public static boolean isDEFAULT_ENABLE_BACKING_STORE() -
setDEFAULT_ENABLE_BACKING_STORE
public static void setDEFAULT_ENABLE_BACKING_STORE(boolean DEFAULT_ENABLE_BACKING_STORE) -
getDEFAULT_RESIDENT_SIZE
public static int getDEFAULT_RESIDENT_SIZE() -
setDEFAULT_RESIDENT_SIZE
public static void setDEFAULT_RESIDENT_SIZE(int DEFAULT_RESIDENT_SIZE) -
getDEFAULT_CACHE_INCREMENT
public static double getDEFAULT_CACHE_INCREMENT() -
setDEFAULT_CACHE_INCREMENT
public static void setDEFAULT_CACHE_INCREMENT(double DEFAULT_CACHE_INCREMENT) -
write
Method write- Overrides:
writein classOutputStream- Parameters:
bytes-- Throws:
IOException
-
write
Method write- Overrides:
writein classOutputStream- Parameters:
bytes-start-length-- Throws:
IOException
-
write
Method write- Specified by:
writein classOutputStream- Parameters:
b-- Throws:
IOException
-
close
Method close- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
size
public long size()Method size- Returns:
-
flush
Method flush- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
increaseCapacity
Method increaseCapacity- Parameters:
count-- Throws:
IOException
-
discardBuffer
public void discardBuffer()Method discardBuffer -
makeInputStream
Method makeInputStream- Returns:
- Throws:
IOExceptionFileNotFoundException
-
finalize
protected void finalize()Method finalize -
switchToBackingStore
Method switchToBackingStore- Throws:
IOException
-
getBackingStoreFileName
Method getBackingStoreFileName- Throws:
IOException
-
discardBackingStore
protected void discardBackingStore()Method discardBackingStore -
createBackingStoreInputStream
Method createBackingStoreInputStream- Returns:
- Throws:
FileNotFoundException
-
toByteArray
Method toByteArray- Returns:
- Throws:
IOException
-
writeTo
Method writeTo- Parameters:
os-- Throws:
IOException
-