Package coneforest.psylla.core
Class PsyInput
java.lang.Object
coneforest.psylla.core.PsyInput
- All Implemented Interfaces:
PsyCloseable
,PsyConvertableToName
,PsyConvertableToString
,PsyObject
,PsyReadable
,PsyReady
,PsyResetable
-
Field Summary
Fields inherited from interface coneforest.psylla.core.PsyCloseable
OPERATORS
Fields inherited from interface coneforest.psylla.core.PsyReadable
OPERATORS
Fields inherited from interface coneforest.psylla.core.PsyResetable
OPERATORS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInput()
void
psyClose()
Closes this object.Read a line (string
) from this object and returns it.psyReadString
(PsyInteger oCount) Read astring
from this object and returns it.psyReady()
Returns aboolean
object indicating whether this object is ready to be read.void
psyReset()
Reset thisresetable
object.psySkip
(PsyInteger oCount) Skips characters.int
read()
void
setInput
(InputStream input) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
Methods inherited from interface coneforest.psylla.core.PsyReadable
psyRead
-
Constructor Details
-
PsyInput
-
-
Method Details
-
setInput
-
getInput
-
read
- Specified by:
read
in interfacePsyReadable
- Throws:
PsyErrorException
-
psyReadString
Description copied from interface:PsyReadable
Read astring
from this object and returns it.- Specified by:
psyReadString
in interfacePsyReadable
- Parameters:
oCount
- aninteger
representing the length of the string.- Returns:
- a string read.
- Throws:
PsyErrorException
- when error occurs.
-
psyReadLine
Description copied from interface:PsyReadable
Read a line (string
) from this object and returns it.- Specified by:
psyReadLine
in interfacePsyReadable
- Returns:
- a line read,
- Throws:
PsyErrorException
- when error occurs.
-
psyClose
Description copied from interface:PsyCloseable
Closes this object.- Specified by:
psyClose
in interfacePsyCloseable
- Throws:
PsyErrorException
- when error occured during closing.
-
psyReady
Description copied from interface:PsyReadable
Returns aboolean
object indicating whether this object is ready to be read.- Specified by:
psyReady
in interfacePsyReadable
- Specified by:
psyReady
in interfacePsyReady
- Returns:
true
if this object is ready to be read, andfalse
otherwise.- Throws:
PsyIOErrorException
- when I/O error occurs.
-
psySkip
Description copied from interface:PsyReadable
Skips characters. This method will block until some characters are available, an I/O error occurs, or end of input is reached.- Specified by:
psySkip
in interfacePsyReadable
- Parameters:
oCount
- aninteger
representing the number of characters to be skipped.- Returns:
- an
integer
representing the number of characters actually skipped. - Throws:
PsyRangeCheckException
PsyIOErrorException
-
psyReset
Description copied from interface:PsyResetable
Reset thisresetable
object.- Specified by:
psyReset
in interfacePsyResetable
- Throws:
PsyErrorException
- when error occured during reset.
-