public class PRReader
extends java.io.Reader
PRReader is a thin wrapper around java.io.Reader that ALWAYS
uses an encoding instead of relying on the platform default.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
copyright
|
static java.lang.String |
VERSION
version id
|
| Constructor and Description |
|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
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_* typesjava.io.IOExceptionjava.io.UnsupportedEncodingExceptionpublic 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_* typesjava.io.FileNotFoundExceptionjava.io.UnsupportedEncodingExceptionjava.io.IOExceptionpublic PRReader(PRFile aFile, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
java.io.FileNotFoundExceptionjava.io.UnsupportedEncodingExceptionjava.io.IOExceptionpublic PRReader(java.lang.String aFileSpec,
java.lang.String aEncoding)
throws java.io.FileNotFoundException,
java.io.UnsupportedEncodingException,
java.io.IOException
PRReader from the specified aFilePathNameaFileSpec - The URL specification for the fileaEncoding - The encoding type to use. See PRFileUtil.ENCODING_* typesjava.io.FileNotFoundExceptionjava.io.UnsupportedEncodingExceptionjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOExceptionInputStreamReader.close()public int read(char[] aCbuf,
int aOff,
int aLen)
throws java.io.IOException
read in class java.io.ReaderaCbuf - Destination bufferaOff - Offset at which to start storing charactersaLen - Maximum number of characters to readjava.io.IOException - If an I/O error occursInputStreamReader.read(char[], int, int)public long byteLength()
Copyright © 2014 Pegasystems Inc. All Rights Reserved.