Package io.github.qishr.cascara.common.io
Class ResourceStream
java.lang.Object
java.io.InputStream
io.github.qishr.cascara.common.io.ResourceStream
public final class ResourceStream
extends InputStream
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| public ContentType | contentType | |
| public final InputStream | stream |
Constructor Summary
| Constructor | Description |
|---|---|
| ResourceStream(InputStream stream, ContentType contentType) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public ResourceStream | setContentType(ContentType contentType) | |
| public void | close() | |
| public int | read(byte[] b) | |
| public int | read(byte[] b, int off, int len) | |
| public byte[] | readAllBytes() | |
| public byte[] | readNBytes(int len) | |
| public int | readNBytes(byte[] b, int off, int len) | |
| public long | skip(long n) | |
| public void | skipNBytes(long n) | |
| public int | available() | |
| public long | transferTo(OutputStream out) | |
| public int | read() |
Field Details
contentType
public ContentType contentType
stream
public final InputStream stream
Method Details
setContentType
public ResourceStream setContentType(ContentType contentType)
close
public void close()
Throws:
Overrides:
read
public int read(byte[] b)
Throws:
read
public int read(byte[] b, int off, int len)
Throws:
readAllBytes
public byte[] readAllBytes()
Throws:
readNBytes
public byte[] readNBytes(int len)
Throws:
readNBytes
public int readNBytes(byte[] b, int off, int len)
Throws:
skip
public long skip(long n)
Throws:
skipNBytes
public void skipNBytes(long n)
Throws:
available
public int available()
Throws:
transferTo
public long transferTo(OutputStream out)
Throws:
read
public int read()
Throws:
Overrides: