Class BoundedInputStream

java.lang.Object
java.io.InputStream
nu.validator.io.BoundedInputStream
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public final class BoundedInputStream
extends java.io.InputStream
Version:
$Id$
Author:
hsivonen
  • Constructor Summary

    Constructors 
    Constructor Description
    BoundedInputStream​(java.io.InputStream delegate, long limit, java.lang.String systemId)  
  • Method Summary

    Modifier and Type Method Description
    int available()  
    void close()  
    void mark​(int arg0)  
    boolean markSupported()  
    int read()  
    int read​(byte[] arg0)  
    int read​(byte[] arg0, int arg1, int arg2)  
    void reset()  
    long skip​(long arg0)  

    Methods inherited from class java.io.InputStream

    nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo

    Methods inherited from class java.lang.Object

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

    • BoundedInputStream

      public BoundedInputStream​(java.io.InputStream delegate, long limit, java.lang.String systemId)
      Parameters:
      delegate -
      limit -
  • Method Details

    • available

      public int available() throws java.io.IOException
      Overrides:
      available in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.available()
    • close

      public void close() throws java.io.IOException
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable
      Overrides:
      close in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.close()
    • mark

      public void mark​(int arg0)
      Overrides:
      mark in class java.io.InputStream
      See Also:
      InputStream.mark(int)
    • markSupported

      public boolean markSupported()
      Overrides:
      markSupported in class java.io.InputStream
      See Also:
      InputStream.markSupported()
    • read

      public int read() throws java.io.IOException
      Specified by:
      read in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.read()
    • read

      public int read​(byte[] arg0) throws java.io.IOException
      Overrides:
      read in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.read(byte[])
    • read

      public int read​(byte[] arg0, int arg1, int arg2) throws java.io.IOException
      Overrides:
      read in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.read(byte[], int, int)
    • reset

      public void reset() throws java.io.IOException
      Overrides:
      reset in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.reset()
    • skip

      public long skip​(long arg0) throws java.io.IOException
      Overrides:
      skip in class java.io.InputStream
      Throws:
      java.io.IOException
      See Also:
      InputStream.skip(long)