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.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_* typesjava.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_* typesjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
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 readjava.io.IOException
- If an I/O error occursInputStreamReader.read(char[], int, int)
public long byteLength()
Copyright © 2018 Pegasystems Inc. All Rights Reserved.