Class InputStreamSegment

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

    public class InputStreamSegment
    extends com.emc.rest.util.SizedInputStream
    Takes a specific segment of a provided InputStream by seeking to the offset and providing only length bytes.
    • Constructor Summary

      Constructors 
      Constructor Description
      InputStreamSegment​(java.io.InputStream inputStream, long offset, long length)
      NOTE: This will seek into the provided stream by offset bytes using repeated calls to InputStream.skip(long).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getOffset()  
      • Methods inherited from class com.emc.rest.util.SizedInputStream

        available, close, getRead, getSize, mark, markSupported, read, read, read, remaining, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • InputStreamSegment

        public InputStreamSegment​(java.io.InputStream inputStream,
                                  long offset,
                                  long length)
                           throws java.io.IOException
        NOTE: This will seek into the provided stream by offset bytes using repeated calls to InputStream.skip(long). Be sure this is what you want.
        Throws:
        java.io.IOException
    • Method Detail

      • getOffset

        public long getOffset()