public final class InputStreamOf extends InputStream
InputStream
that encapsulates other sources of data.
There is no thread-safety guarantee.
Constructor and Description |
---|
InputStreamOf(byte[] bytes)
Ctor.
|
InputStreamOf(Bytes bytes)
Ctor.
|
InputStreamOf(CharSequence text)
Ctor.
|
InputStreamOf(CharSequence text,
CharSequence charset)
Ctor.
|
InputStreamOf(CharSequence text,
Charset charset)
Ctor.
|
InputStreamOf(File file)
Ctor.
|
InputStreamOf(Input input)
Ctor.
|
InputStreamOf(Path path)
Ctor.
|
InputStreamOf(Reader rdr)
Ctor.
|
InputStreamOf(Reader rdr,
CharSequence charset)
Ctor.
|
InputStreamOf(Reader rdr,
CharSequence charset,
int max)
Ctor.
|
InputStreamOf(Reader rdr,
Charset charset)
Ctor.
|
InputStreamOf(Reader rdr,
Charset cset,
int max)
Ctor.
|
InputStreamOf(Reader rdr,
int max)
Ctor.
|
InputStreamOf(Text text)
Ctor.
|
InputStreamOf(Text text,
CharSequence charset)
Ctor.
|
InputStreamOf(Text text,
Charset charset)
Ctor.
|
InputStreamOf(URI uri)
Ctor.
|
InputStreamOf(URL url)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
void |
mark(int limit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] buffer) |
int |
read(byte[] buffer,
int offset,
int length) |
void |
reset() |
long |
skip(long num) |
public InputStreamOf(Path path)
path
- The pathpublic InputStreamOf(File file)
file
- The filepublic InputStreamOf(URL url)
url
- The URLpublic InputStreamOf(URI uri)
uri
- The URIpublic InputStreamOf(Bytes bytes)
bytes
- The textpublic InputStreamOf(byte[] bytes)
bytes
- The textpublic InputStreamOf(Text text)
text
- The textpublic InputStreamOf(Text text, Charset charset)
text
- The textcharset
- Charsetpublic InputStreamOf(Text text, CharSequence charset)
text
- The textcharset
- Charsetpublic InputStreamOf(CharSequence text)
text
- The textpublic InputStreamOf(CharSequence text, Charset charset)
text
- The textcharset
- Charsetpublic InputStreamOf(CharSequence text, CharSequence charset)
text
- The textcharset
- Charsetpublic InputStreamOf(Reader rdr)
rdr
- The readerpublic InputStreamOf(Reader rdr, Charset charset)
rdr
- Readercharset
- Charsetpublic InputStreamOf(Reader rdr, CharSequence charset)
rdr
- Readercharset
- Charsetpublic InputStreamOf(Reader rdr, Charset cset, int max)
rdr
- Readercset
- Charsetmax
- Buffer sizepublic InputStreamOf(Reader rdr, int max)
rdr
- Readermax
- Buffer sizepublic InputStreamOf(Reader rdr, CharSequence charset, int max)
rdr
- Readercharset
- Charsetmax
- Buffer sizepublic InputStreamOf(Input input)
input
- The inputpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buffer) throws IOException
read
in class InputStream
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public long skip(long num) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void mark(int limit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
Copyright © 2017 Cactoos. All rights reserved.