public class LimitedInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
LimitedInputStream(java.io.InputStream in,
int maxBytes) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
static java.util.zip.GZIPInputStream |
createGZIPInputStream(java.io.InputStream in,
int maxBytes) |
int |
getBytesLeft() |
int |
read() |
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int offset,
int count) |
long |
skip(long byteCount) |
public LimitedInputStream(java.io.InputStream in,
int maxBytes)
public static java.util.zip.GZIPInputStream createGZIPInputStream(java.io.InputStream in,
int maxBytes)
throws java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int count)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buffer)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long byteCount)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int getBytesLeft()
Available under the Apache License, Version 2.0 - Copyright © 2012-2020 greenrobot.org. All Rights Reserved.