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_CLOSEFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsyReadable
PSY_READ, PSY_SKIPFields inherited from interface coneforest.psylla.core.PsyResetable
PSY_RESET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInput()voidpsyClose()Closes this object.Read a line (string) from this object and returns it.psyReadString(PsyInteger oCount) Read astringfrom this object and returns it.psyReady()Returns abooleanobject indicating whether this object is ready to be read.voidpsyReset()Reset thisresetableobject.psySkip(PsyInteger oCount) Skips characters.intread()voidsetInput(InputStream input) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeNameMethods inherited from interface coneforest.psylla.core.PsyReadable
psyRead
-
Constructor Details
-
PsyInput
-
-
Method Details
-
setInput
-
getInput
-
read
- Specified by:
readin interfacePsyReadable- Throws:
PsyIOErrorException
-
psyReadString
Description copied from interface:PsyReadableRead astringfrom this object and returns it.- Specified by:
psyReadStringin interfacePsyReadable- Parameters:
oCount- anintegerrepresenting the length of the string.- Returns:
- a string read.
- Throws:
PsyUnsupportedException
-
psyReadLine
Description copied from interface:PsyReadableRead a line (string) from this object and returns it.- Specified by:
psyReadLinein interfacePsyReadable- Returns:
- a line read.
- Throws:
PsyUnsupportedException
-
psyClose
Description copied from interface:PsyCloseableCloses this object.- Specified by:
psyClosein interfacePsyCloseable- Throws:
PsyIOErrorException- when I/O error occured during closing.
-
psyReady
Description copied from interface:PsyReadableReturns abooleanobject indicating whether this object is ready to be read.- Specified by:
psyReadyin interfacePsyReadable- Specified by:
psyReadyin interfacePsyReady- Returns:
trueif this object is ready to be read, andfalseotherwise.- Throws:
PsyIOErrorException- when I/O error occurs.
-
psySkip
Description copied from interface:PsyReadableSkips characters. This method will block until some characters are available, an I/O error occurs, or end of input is reached.- Specified by:
psySkipin interfacePsyReadable- Parameters:
oCount- anintegerrepresenting the number of characters to be skipped.- Returns:
- an
integerrepresenting the number of characters actually skipped. - Throws:
PsyIOErrorException- when I/O error occurs.PsyRangeCheckException
-
psyReset
Description copied from interface:PsyResetableReset thisresetableobject.- Specified by:
psyResetin interfacePsyResetable- Throws:
PsyIOErrorException
-