Class ByteArray

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class ByteArray
    extends java.io.OutputStream
    Class ByteArray
    • 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
      • 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
        Overrides:
        write in class java.io.OutputStream
        Parameters:
        bytes -
        Throws:
        java.io.IOException
      • write

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

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

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

        public long size()
        Method size
        Returns:
      • flush

        public void flush()
                   throws java.io.IOException
        Method flush
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        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
        Overrides:
        finalize in class java.lang.Object
      • 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