|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
com.pega.pegarules.pub.util.PRReader
public class PRReader
PRReader
is a thin wrapper around java.io.Reader that ALWAYS
uses an encoding instead of relying on the platform default.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
copyright |
static java.lang.String |
VERSION
version id |
Constructor Summary | |
---|---|
PRReader(java.io.File aFile,
java.lang.String aEncoding)
Deprecated. |
|
PRReader(java.io.InputStream aInStream,
java.lang.String aEncoding)
Creates a new PRReader from the specified aInStream . |
|
PRReader(PRFile aFile,
java.lang.String aEncoding)
|
|
PRReader(java.lang.String aFileSpec,
java.lang.String aEncoding)
Creates a new PRReader from the specified aFilePathName |
Method Summary | |
---|---|
long |
byteLength()
Returns the number of bytes (not characters) in the underlying stream that will be processed and returned by this reader. |
void |
close()
Close the stream. |
int |
read(char[] aCbuf,
int aOff,
int aLen)
Read characters into a portion of an array. |
Methods inherited from class java.io.Reader |
---|
mark, markSupported, read, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
Constructor Detail |
---|
public PRReader(java.io.InputStream aInStream, java.lang.String aEncoding) throws java.io.IOException, java.io.UnsupportedEncodingException
PRReader
from the specified aInStream
.
aInStream
- a InputStreamaEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* types
java.io.IOException
java.io.UnsupportedEncodingException
public PRReader(java.io.File aFile, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
PRReader
from the specified File
.
aFile
- a FileaEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* types
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public PRReader(PRFile aFile, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public PRReader(java.lang.String aFileSpec, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
PRReader
from the specified aFilePathName
aFileSpec
- The URL specification for the fileaEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* types
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
InputStreamReader.close()
public int read(char[] aCbuf, int aOff, int aLen) throws java.io.IOException
read
in class java.io.Reader
aCbuf
- Destination bufferaOff
- Offset at which to start storing charactersaLen
- Maximum number of characters to read
java.io.IOException
- If an I/O error occursInputStreamReader.read(char[], int, int)
public long byteLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |