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.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer, int offset, int count) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buffer) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long byteCount) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int getBytesLeft()
Available under the Apache License, Version 2.0 - Copyright © 2012-2016 greenrobot.org. All Rights Reserved.