org.apache.axis.utils

Class ByteArray


public class ByteArray
extends OutputStream

Class ByteArray

Field Summary

protected static double
DEFAULT_CACHE_INCREMENT
protected static boolean
DEFAULT_ENABLE_BACKING_STORE
protected static int
DEFAULT_RESIDENT_SIZE
protected static int
WORKING_BUFFER_SIZE
protected File
bs_handle
protected OutputStream
bs_stream
protected ByteArrayOutputStream
cache
protected long
count
protected boolean
enableBackingStore
protected int
max_size

Constructor Summary

ByteArray()
Constructor ByteArray
ByteArray(int max_resident_size)
Constructor ByteArray
ByteArray(int probable_size, int max_resident_size)
Constructor ByteArray

Method Summary

void
close()
Method close
protected InputStream
createBackingStoreInputStream()
Method createBackingStoreInputStream
protected void
discardBackingStore()
Method discardBackingStore
void
discardBuffer()
Method discardBuffer
protected void
finalize()
Method finalize
void
flush()
Method flush
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 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(bytes[] )
Method write
void
write(bytes[] , int start, int length)
Method write
void
write(int b)
Method write
void
writeTo(OutputStream os)
Method writeTo

Field Details

DEFAULT_CACHE_INCREMENT

protected static double DEFAULT_CACHE_INCREMENT


DEFAULT_ENABLE_BACKING_STORE

protected static boolean DEFAULT_ENABLE_BACKING_STORE


DEFAULT_RESIDENT_SIZE

protected static int DEFAULT_RESIDENT_SIZE


WORKING_BUFFER_SIZE

protected static int WORKING_BUFFER_SIZE


bs_handle

protected File bs_handle


bs_stream

protected OutputStream bs_stream


cache

protected ByteArrayOutputStream cache


count

protected long count


enableBackingStore

protected boolean enableBackingStore


max_size

protected int max_size

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

close

public void close()
            throws IOException
Method close


createBackingStoreInputStream

protected InputStream createBackingStoreInputStream()
            throws FileNotFoundException
Method createBackingStoreInputStream

Returns:


discardBackingStore

protected void discardBackingStore()
Method discardBackingStore


discardBuffer

public void discardBuffer()
Method discardBuffer


finalize

protected void finalize()
Method finalize


flush

public void flush()
            throws IOException
Method flush


getBackingStoreFileName

public String getBackingStoreFileName()
            throws IOException
Method getBackingStoreFileName


getDEFAULT_CACHE_INCREMENT

public static double getDEFAULT_CACHE_INCREMENT()


getDEFAULT_RESIDENT_SIZE

public static int getDEFAULT_RESIDENT_SIZE()


increaseCapacity

protected void increaseCapacity(int count)
            throws IOException
Method increaseCapacity

Parameters:
count -


isDEFAULT_ENABLE_BACKING_STORE

public static boolean isDEFAULT_ENABLE_BACKING_STORE()


isEnableBackingStore

public boolean isEnableBackingStore()


makeInputStream

protected InputStream makeInputStream()
            throws IOException,
                   FileNotFoundException
Method makeInputStream

Returns:


setDEFAULT_CACHE_INCREMENT

public static void setDEFAULT_CACHE_INCREMENT(double DEFAULT_CACHE_INCREMENT)


setDEFAULT_ENABLE_BACKING_STORE

public static void setDEFAULT_ENABLE_BACKING_STORE(boolean DEFAULT_ENABLE_BACKING_STORE)


setDEFAULT_RESIDENT_SIZE

public static void setDEFAULT_RESIDENT_SIZE(int DEFAULT_RESIDENT_SIZE)


setEnableBackingStore

public void setEnableBackingStore(boolean enableBackingStore)


size

public long size()
Method size

Returns:


switchToBackingStore

protected void switchToBackingStore()
            throws IOException
Method switchToBackingStore


toByteArray

public byte[] toByteArray()
            throws IOException
Method toByteArray

Returns:


write

public void write(bytes[] )
            throws IOException
Method write

Parameters:


write

public void write(bytes[] ,
                  int start,
                  int length)
            throws IOException
Method write

Parameters:
start -
length -


write

public void write(int b)
            throws IOException
Method write

Parameters:
b -


writeTo

public void writeTo(OutputStream os)
            throws IOException
Method writeTo

Parameters:
os -


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.