public static class AbstractOrigin.InputStreamOrigin extends AbstractOrigin<InputStream,AbstractOrigin.InputStreamOrigin>
InputStream origin.
This origin cannot provide some of the other aspects.
AbstractOrigin.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOrigin| Constructor and Description |
|---|
InputStreamOrigin(InputStream origin)
Constructs a new instance for the given origin.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getByteArray()
Gets this origin as a byte array, if possible.
|
InputStream |
getInputStream(OpenOption... options)
Gets this origin as an InputStream, if possible.
|
Reader |
getReader(Charset charset)
Gets a new Reader on the origin, buffered by default.
|
get, getByteArray, getCharSequence, getFile, getOutputStream, getPath, getWriter, size, toStringasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasSupplierpublic InputStreamOrigin(InputStream origin)
origin - The origin.public byte[] getByteArray() throws IOException
AbstractOrigingetByteArray in class AbstractOrigin<InputStream,AbstractOrigin.InputStreamOrigin>IOException - if an I/O error occurs.public InputStream getInputStream(OpenOption... options)
AbstractOrigingetInputStream in class AbstractOrigin<InputStream,AbstractOrigin.InputStreamOrigin>options - options specifying how the file is openedpublic Reader getReader(Charset charset) throws IOException
AbstractOrigingetReader in class AbstractOrigin<InputStream,AbstractOrigin.InputStreamOrigin>charset - the charset to use for decodingIOException - if an I/O error occurs opening the file.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.