org.eclipse.net4j.util.io

## Class LimitedInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.eclipse.net4j.util.io.LimitedInputStream

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

      public class LimitedInputStream
      extends java.io.InputStream

  Since:
    3.2
  Author:
    Eike Stepper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LimitedInputStream(java.io.InputStream in, long length)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `mark(int readlimit)`
    `boolean` | `markSupported()`
    `int` | `read()`
    `int` | `read(byte[] cbuf, int off, int len)`
    `void` | `reset()`
    `long` | `skip(long n)`

    - ### Methods inherited from class java.io.InputStream

      `available, read`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LimitedInputStream

          public LimitedInputStream(java.io.InputStream in,
                                    long length)

  - ### Method Detail

    - #### read

          public int read()
                   throws java.io.IOException

      Specified by:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### read

          public int read(byte[] cbuf,
                          int off,
                          int len)
                   throws java.io.IOException

      Overrides:
        `read` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### skip

          public long skip(long n)
                    throws java.io.IOException

      Overrides:
        `skip` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `java.io.InputStream`

    - #### mark

          public void mark(int readlimit)

      Overrides:
        `mark` in class `java.io.InputStream`

    - #### reset

          public void reset()
                     throws java.io.IOException

      Overrides:
        `reset` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.InputStream`
      Throws:
        `java.io.IOException`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html