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 File
protected OutputStream
protected ByteArrayOutputStream
protected long
protected static double
protected static boolean
protected static int
protected boolean
protected int
protected static int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Method closeprotected InputStream
Method createBackingStoreInputStreamprotected void
Method discardBackingStorevoid
Method discardBufferprotected void
finalize()
Method finalizevoid
flush()
Method flushMethod getBackingStoreFileNamestatic double
static int
protected void
increaseCapacity
(int count) Method increaseCapacitystatic boolean
boolean
protected InputStream
Method makeInputStreamstatic 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 sizeprotected void
Method switchToBackingStorebyte[]
Method toByteArrayvoid
write
(byte[] bytes) Method writevoid
write
(byte[] bytes, int start, int length) Method writevoid
write
(int b) Method writevoid
writeTo
(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:
write
in classOutputStream
- Parameters:
bytes
-- Throws:
IOException
-
write
Method write- Overrides:
write
in classOutputStream
- Parameters:
bytes
-start
-length
-- Throws:
IOException
-
write
Method write- Specified by:
write
in classOutputStream
- Parameters:
b
-- Throws:
IOException
-
close
Method close- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
size
public long size()Method size- Returns:
-
flush
Method flush- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
increaseCapacity
Method increaseCapacity- Parameters:
count
-- Throws:
IOException
-
discardBuffer
public void discardBuffer()Method discardBuffer -
makeInputStream
Method makeInputStream- Returns:
- Throws:
IOException
FileNotFoundException
-
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
-