Class ByteArray

java.lang.Object
java.io.OutputStream
org.apache.axis.utils.ByteArray
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ByteArray extends OutputStream
Class ByteArray
  • 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

      protected ByteArrayOutputStream cache
    • max_size

      protected int max_size
    • bs_handle

      protected File bs_handle
    • bs_stream

      protected OutputStream 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

      public void write(byte[] bytes) throws IOException
      Method write
      Overrides:
      write in class OutputStream
      Parameters:
      bytes -
      Throws:
      IOException
    • write

      public void write(byte[] bytes, int start, int length) throws IOException
      Method write
      Overrides:
      write in class OutputStream
      Parameters:
      bytes -
      start -
      length -
      Throws:
      IOException
    • write

      public void write(int b) throws IOException
      Method write
      Specified by:
      write in class OutputStream
      Parameters:
      b -
      Throws:
      IOException
    • close

      public void close() throws IOException
      Method close
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException
    • size

      public long size()
      Method size
      Returns:
    • flush

      public void flush() throws IOException
      Method flush
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException
    • increaseCapacity

      protected void increaseCapacity(int count) throws IOException
      Method increaseCapacity
      Parameters:
      count -
      Throws:
      IOException
    • discardBuffer

      public void discardBuffer()
      Method discardBuffer
    • makeInputStream

      protected InputStream makeInputStream() throws IOException, FileNotFoundException
      Method makeInputStream
      Returns:
      Throws:
      IOException
      FileNotFoundException
    • finalize

      protected void finalize()
      Method finalize
      Overrides:
      finalize in class Object
    • switchToBackingStore

      protected void switchToBackingStore() throws IOException
      Method switchToBackingStore
      Throws:
      IOException
    • getBackingStoreFileName

      public String getBackingStoreFileName() throws IOException
      Method getBackingStoreFileName
      Throws:
      IOException
    • discardBackingStore

      protected void discardBackingStore()
      Method discardBackingStore
    • createBackingStoreInputStream

      protected InputStream createBackingStoreInputStream() throws FileNotFoundException
      Method createBackingStoreInputStream
      Returns:
      Throws:
      FileNotFoundException
    • toByteArray

      public byte[] toByteArray() throws IOException
      Method toByteArray
      Returns:
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream os) throws IOException
      Method writeTo
      Parameters:
      os -
      Throws:
      IOException