public final class HeadInputStream extends InputStream
There is no thread-safety guarantee.
Constructor and Description |
---|
HeadInputStream(InputStream orig,
int len)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
void |
reset() |
long |
skip(long skip) |
read, read
public HeadInputStream(InputStream orig, int len)
orig
- The original input stream.len
- A number of bytes that can be read from the beginning.public int read() throws IOException
read
in class InputStream
IOException
public long skip(long skip) throws IOException
skip
in class InputStream
IOException
public void reset() throws IOException
reset
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
Copyright © 2017–2020 Cactoos. All rights reserved.