org.apache.axis.utils

Class ByteArray

public class ByteArray extends OutputStream

Class ByteArray
Field Summary
protected Filebs_handle
protected OutputStreambs_stream
protected ByteArrayOutputStreamcache
protected longcount
protected static doubleDEFAULT_CACHE_INCREMENT
protected static booleanDEFAULT_ENABLE_BACKING_STORE
protected static intDEFAULT_RESIDENT_SIZE
protected booleanenableBackingStore
protected intmax_size
protected static intWORKING_BUFFER_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
voidclose()
Method close
protected InputStreamcreateBackingStoreInputStream()
Method createBackingStoreInputStream
protected voiddiscardBackingStore()
Method discardBackingStore
voiddiscardBuffer()
Method discardBuffer
protected voidfinalize()
Method finalize
voidflush()
Method flush
StringgetBackingStoreFileName()
Method getBackingStoreFileName
static doublegetDEFAULT_CACHE_INCREMENT()
static intgetDEFAULT_RESIDENT_SIZE()
protected voidincreaseCapacity(int count)
Method increaseCapacity
static booleanisDEFAULT_ENABLE_BACKING_STORE()
booleanisEnableBackingStore()
protected InputStreammakeInputStream()
Method makeInputStream
static 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 size
protected voidswitchToBackingStore()
Method switchToBackingStore
byte[]toByteArray()
Method toByteArray
voidwrite(byte[] bytes)
Method write
voidwrite(byte[] bytes, int start, int length)
Method write
voidwrite(int b)
Method write
voidwriteTo(OutputStream os)
Method writeTo

Field Detail

bs_handle

protected File bs_handle

bs_stream

protected OutputStream bs_stream

cache

protected ByteArrayOutputStream cache

count

protected long count

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

enableBackingStore

protected boolean enableBackingStore

max_size

protected int max_size

WORKING_BUFFER_SIZE

protected static int WORKING_BUFFER_SIZE

Constructor Detail

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 Detail

close

public void close()
Method close

Throws: IOException

createBackingStoreInputStream

protected InputStream createBackingStoreInputStream()
Method createBackingStoreInputStream

Returns:

Throws: FileNotFoundException

discardBackingStore

protected void discardBackingStore()
Method discardBackingStore

discardBuffer

public void discardBuffer()
Method discardBuffer

finalize

protected void finalize()
Method finalize

flush

public void flush()
Method flush

Throws: IOException

getBackingStoreFileName

public String getBackingStoreFileName()
Method getBackingStoreFileName

Throws: IOException

getDEFAULT_CACHE_INCREMENT

public static double getDEFAULT_CACHE_INCREMENT()

getDEFAULT_RESIDENT_SIZE

public static int getDEFAULT_RESIDENT_SIZE()

increaseCapacity

protected void increaseCapacity(int count)
Method increaseCapacity

Parameters: count

Throws: IOException

isDEFAULT_ENABLE_BACKING_STORE

public static boolean isDEFAULT_ENABLE_BACKING_STORE()

isEnableBackingStore

public boolean isEnableBackingStore()

makeInputStream

protected InputStream makeInputStream()
Method makeInputStream

Returns:

Throws: IOException FileNotFoundException

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()
Method switchToBackingStore

Throws: IOException

toByteArray

public byte[] toByteArray()
Method toByteArray

Returns:

Throws: IOException

write

public void write(byte[] bytes)
Method write

Parameters: bytes

Throws: IOException

write

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

Parameters: bytes start length

Throws: IOException

write

public void write(int b)
Method write

Parameters: b

Throws: IOException

writeTo

public void writeTo(OutputStream os)
Method writeTo

Parameters: os

Throws: IOException

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