Class NullInputStream

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

    public class NullInputStream
    extends java.io.InputStream
    An InputStream that contains no bytes.
    Version:
    $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/NullInputStream.java#2 $
    • Constructor Summary

      Constructors 
      Constructor Description
      NullInputStream()
      Creates a NullInputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()
      This implementation returns 0, always.
      int read()
      This implementation returns -1 (EOF), always.
      long skip​(long pOffset)
      This implementation returns 0, always.
      • Methods inherited from class java.io.InputStream

        close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, transferTo
      • Methods inherited from class java.lang.Object

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

      • NullInputStream

        public NullInputStream()
        Creates a NullInputStream.
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        This implementation returns -1 (EOF), always.
        Specified by:
        read in class java.io.InputStream
        Returns:
        -1
        Throws:
        java.io.IOException
      • available

        public int available()
                      throws java.io.IOException
        This implementation returns 0, always.
        Overrides:
        available in class java.io.InputStream
        Returns:
        0
        Throws:
        java.io.IOException
      • skip

        public long skip​(long pOffset)
                  throws java.io.IOException
        This implementation returns 0, always.
        Overrides:
        skip in class java.io.InputStream
        Returns:
        0
        Throws:
        java.io.IOException