Java io stringreader source code

Java io stringreader source code

Skips the specified number of characters in the stream. Returns the number of characters that were skipped. The ns parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. Negative values of ns cause the stream to skip backwards. Negative return values indicate a skip backwards. It is not possible to skip backwards past the beginning of the string. If the entire string has been read or skipped, then this method has no effect and always returns 0.

ready

markSupported

public boolean markSupported()

mark

Marks the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

reset

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

close

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously closed stream has no effect.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Class StringReader

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

Methods declared in class java.io.Reader

Methods declared in class java.lang.Object

Constructor Details

StringReader

Method Details

read

read

Reads characters into a portion of an array. If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf .

Читайте также:  Перехват нажатия клавиш javascript

skip

Skips characters. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned. The n parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. Negative values of n cause the stream to skip backwards. Negative return values indicate a skip backwards. It is not possible to skip backwards past the beginning of the string. If the entire string has been read or skipped, then this method has no effect and always returns 0 .

ready

markSupported

mark

Marks the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

reset

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

close

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously closed stream has no effect. This method will block while there is another thread blocking on the reader.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Class StringReader

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

Methods declared in class java.io.Reader

Methods declared in class java.lang.Object

Constructor Details

StringReader

Method Details

read

read

Reads characters into a portion of an array. If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf .

Читайте также:  Php post file stream

skip

Skips characters. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned. The n parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. Negative values of n cause the stream to skip backwards. Negative return values indicate a skip backwards. It is not possible to skip backwards past the beginning of the string. If the entire string has been read or skipped, then this method has no effect and always returns 0 .

ready

markSupported

mark

Marks the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

reset

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

close

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously closed stream has no effect. This method will block while there is another thread blocking on the reader.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Java io stringreader source code

Skips the specified number of characters in the stream. Returns the number of characters that were skipped. The ns parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. Negative values of ns cause the stream to skip backwards. Negative return values indicate a skip backwards. It is not possible to skip backwards past the beginning of the string. If the entire string has been read or skipped, then this method has no effect and always returns 0.

ready

markSupported

public boolean markSupported()

mark

Marks the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

Читайте также:  What is rest web service in java

reset

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

close

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously closed stream has no effect.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Java io stringreader source code

Skips the specified number of characters in the stream. Returns the number of characters that were skipped. The ns parameter may be negative, even though the skip method of the Reader superclass throws an exception in this case. Negative values of ns cause the stream to skip backwards. Negative return values indicate a skip backwards. It is not possible to skip backwards past the beginning of the string. If the entire string has been read or skipped, then this method has no effect and always returns 0.

ready

markSupported

public boolean markSupported()

mark

Marks the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

reset

Resets the stream to the most recent mark, or to the beginning of the string if it has never been marked.

close

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously closed stream has no effect. This method will block while there is another thread blocking on the reader.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Оцените статью