String.getBytes(String)
into a
ByteArrayInputStream
.@Deprecated public class StringInputStream extends InputStream
Constructor and Description |
---|
StringInputStream(String source)
Deprecated.
Composes a stream from a String
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the Stringreader.
|
void |
mark(int limit)
Deprecated.
Marks the read limit of the StringReader.
|
boolean |
markSupported()
Deprecated.
|
int |
read()
Deprecated.
Reads from the Stringreader, returning the same value.
|
void |
reset()
Deprecated.
Resets the StringReader.
|
available, read, read, skip
public StringInputStream(String source)
source
- The string to read from. Must not be null
.public int read() throws IOException
read
in class InputStream
IOException
- if the original StringReader fails to be readpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if the original StringReader fails to be closedpublic void mark(int limit)
mark
in class InputStream
limit
- the maximum limit of bytes that can be read before the mark position becomes invalidpublic void reset() throws IOException
reset
in class InputStream
IOException
- if the StringReader fails to be resetpublic boolean markSupported()
markSupported
in class InputStream
InputStream.markSupported()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.