Package components.simplereader
Class SimpleReaderSecondary
java.lang.Object
components.simplereader.SimpleReaderSecondary
- All Implemented Interfaces:
SimpleReader
,SimpleReaderKernel
,Standard<SimpleReader>
,AutoCloseable
- Direct Known Subclasses:
SimpleReader1L
Layered implementations of secondary methods for
SimpleReader
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of aboolean
, and returns thatboolean
.double
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of adouble
, and returns thatdouble
.int
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of anint
, and returns thatint
.nextLine()
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), and returns everything up to the line separator (if any).long
nextLong()
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of along
, and returns thatlong
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface components.simplereader.SimpleReaderKernel
atEOS, close, isOpen, name, peek, read
Methods inherited from interface components.standard.Standard
clear, newInstance, transferFrom
-
Constructor Details
-
SimpleReaderSecondary
public SimpleReaderSecondary()
-
-
Method Details
-
toString
-
nextLine
Description copied from interface:SimpleReader
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), and returns everything up to the line separator (if any).- Specified by:
nextLine
in interfaceSimpleReader
- Returns:
- the line read without the line separator
-
nextInteger
Description copied from interface:SimpleReader
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of anint
, and returns thatint
.- Specified by:
nextInteger
in interfaceSimpleReader
- Returns:
- the
int
read
-
nextLong
Description copied from interface:SimpleReader
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of along
, and returns thatlong
.- Specified by:
nextLong
in interfaceSimpleReader
- Returns:
- the
long
read
-
nextBoolean
Description copied from interface:SimpleReader
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of aboolean
, and returns thatboolean
.- Specified by:
nextBoolean
in interfaceSimpleReader
- Returns:
- the
boolean
read
-
nextDouble
Description copied from interface:SimpleReader
Reads a line fromthis.content
, up to and including the first line separator (or the end of the stream), where the string before the line separator is the string representation of adouble
, and returns thatdouble
.- Specified by:
nextDouble
in interfaceSimpleReader
- Returns:
- the
double
read
-