## org.apache.axis.utils
Class ByteArray

    java.lang.Object
      java.io.OutputStream
          org.apache.axis.utils.ByteArray

public class ByteArray
extends java.io.OutputStream

Class ByteArray

Field Summary
`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 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 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

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

    protected ByteArrayOutputStream cache

### max_size

    protected int max_size

### bs_handle

    protected java.io.File bs_handle

### bs_stream

    protected java.io.OutputStream bs_stream

### count

    protected long count

### enableBackingStore

    protected boolean enableBackingStore

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

### 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

    public void write(byte[] bytes)
               throws java.io.IOException

  Method write

  Parameters:
    `bytes` -
  Throws:
    `java.io.IOException`

### write

    public void write(byte[] bytes,
                      int start,
                      int length)
               throws java.io.IOException

  Method write

  Parameters:
    `bytes` -
    `start` -
    `length` -
  Throws:
    `java.io.IOException`

### write

    public void write(int b)
               throws java.io.IOException

  Method write

  Parameters:
    `b` -
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Method close

  Throws:
    `java.io.IOException`

### size

    public long size()

  Method size

  Returns:

### flush

    public void flush()
               throws java.io.IOException

  Method flush

  Throws:
    `java.io.IOException`

### increaseCapacity

    protected void increaseCapacity(int count)
                             throws java.io.IOException

  Method increaseCapacity

  Parameters:
    `count` -
  Throws:
    `java.io.IOException`

### discardBuffer

    public void discardBuffer()

  Method discardBuffer

### makeInputStream

    protected java.io.InputStream makeInputStream()
                                           throws java.io.IOException,
                                                  java.io.FileNotFoundException

  Method makeInputStream

  Returns:
  Throws:
    `java.io.IOException`
    `java.io.FileNotFoundException`

### finalize

    protected void finalize()

  Method finalize

### switchToBackingStore

    protected void switchToBackingStore()
                                 throws java.io.IOException

  Method switchToBackingStore

  Throws:
    `java.io.IOException`

### getBackingStoreFileName

    public java.lang.String getBackingStoreFileName()
                                             throws java.io.IOException

  Method getBackingStoreFileName

  Throws:
    `java.io.IOException`

### discardBackingStore

    protected void discardBackingStore()

  Method discardBackingStore

### createBackingStoreInputStream

    protected java.io.InputStream createBackingStoreInputStream()
                                                         throws java.io.FileNotFoundException

  Method createBackingStoreInputStream

  Returns:
  Throws:
    `java.io.FileNotFoundException`

### toByteArray

    public byte[] toByteArray()
                       throws java.io.IOException

  Method toByteArray

  Returns:
  Throws:
    `java.io.IOException`

### writeTo

    public void writeTo(java.io.OutputStream os)
                 throws java.io.IOException

  Method writeTo

  Parameters:
    `os` -
  Throws:
    `java.io.IOException`

Copyright © 2005 Apache Web Services Project. All Rights Reserved.