java.lang.Object
coneforest.psylla.core.PsyInput
- All Implemented Interfaces:
PsyCloseable
,PsyObject
,PsyReadable
,PsyReady
,PsyResetable
@Type("input")
public class PsyInput
extends Object
implements PsyCloseable, PsyReadable, PsyReady, PsyResetable
The representation of
input
.-
Field Summary
Fields inherited from interface coneforest.psylla.core.PsyCloseable
PSY_CLOSE
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsyReadable
PSY_READ, PSY_SKIP
Fields inherited from interface coneforest.psylla.core.PsyResetable
PSY_RESET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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()
Reads a single character.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, psyToString, psyToStringBuffer, psyType, toSyntaxString, typeName
Methods inherited from interface coneforest.psylla.core.PsyReadable
psyRead
-
Constructor Details
-
PsyInput
-
-
Method Details
-
read
Description copied from interface:PsyReadable
Reads a single character.- Specified by:
read
in interfacePsyReadable
- Returns:
- the character read, as an integer in the range 0 to 65535 (
0x00–0xFFFF
), or -1 if the end of the source has been reached. - Throws:
PsyIOErrorException
- when an I/O error occurs.
-
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:
PsyUnsupportedException
-
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:
PsyUnsupportedException
-
psyClose
Description copied from interface:PsyCloseable
Closes this object.- Specified by:
psyClose
in interfacePsyCloseable
- Throws:
PsyIOErrorException
-
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:
PsyIOErrorException
- when I/O error occurs.PsyRangeCheckException
-
psyReset
Description copied from interface:PsyResetable
Reset thisresetable
object.- Specified by:
psyReset
in interfacePsyResetable
- Throws:
PsyIOErrorException
-