Class ThresholdStorageProvider.ThresholdStorage

  • All Implemented Interfaces:
    Storage
    Enclosing class:
    ThresholdStorageProvider

    private static final class ThresholdStorageProvider.ThresholdStorage
    extends java.lang.Object
    implements Storage
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] head  
      private int headLen  
      private Storage tail  
    • Constructor Summary

      Constructors 
      Constructor Description
      ThresholdStorage​(byte[] head, int headLen, Storage tail)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      Deletes the data held by this Storage as soon as possible.
      java.io.InputStream getInputStream()
      Returns an InputStream that can be used to read the stored data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • head

        private byte[] head
      • headLen

        private final int headLen
    • Constructor Detail

      • ThresholdStorage

        public ThresholdStorage​(byte[] head,
                                int headLen,
                                Storage tail)
    • Method Detail

      • delete

        public void delete()
        Description copied from interface: Storage
        Deletes the data held by this Storage as soon as possible. Deleting an already deleted Storage has no effect.
        Specified by:
        delete in interface Storage
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Description copied from interface: Storage
        Returns an InputStream that can be used to read the stored data. The input stream should be closed by the caller when it is no longer needed.

        Note: The stream should NOT be wrapped in a BufferedInputStream by the caller. If the implementing Storage creates a stream which would benefit from being buffered it is the Storage's responsibility to wrap it.

        Specified by:
        getInputStream in interface Storage
        Returns:
        an InputStream for reading the stored data.
        Throws:
        java.io.IOException - if an I/O error occurs.