public class

LimitedInputStream

extends FilterInputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ java.io.FilterInputStream
       ↳ com.facebook.common.streams.LimitedInputStream

Class Overview

Reads the wrapped InputStream only until a specified number of bytes, the 'limit' is reached.

Summary

[Expand]
Inherited Fields
From class java.io.FilterInputStream
Public Constructors
LimitedInputStream(InputStream inputStream, int limit)
Public Methods
int available()
void mark(int readLimit)
int read()
int read(byte[] buffer, int byteOffset, int byteCount)
void reset()
long skip(long byteCount)
[Expand]
Inherited Methods
From class java.io.FilterInputStream
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public Constructors

public LimitedInputStream (InputStream inputStream, int limit)

Public Methods

public int available ()

Throws
IOException

public void mark (int readLimit)

public int read ()

Throws
IOException

public int read (byte[] buffer, int byteOffset, int byteCount)

Throws
IOException

public void reset ()

Throws
IOException

public long skip (long byteCount)

Throws
IOException