|
Oracle® Database Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream | +--oracle.i18n.lcsd.LCSDetectionInputStream
The LCSDetectionInputStream
class is the language and character
detector stream class that transparently detects the language and
character set for the stream object.
The output of read
methods are the original contents of the
input stream in its original state. If the
character set conversion using the detected character set is needed, use
the LCSDetectionReader
class. If the input stream includes the HTML
contents, use the LCSDetectionHTMLInputStream
class or the LCSDetectionHTMLReader
class. The LCSDetectionInputStream
class is used to determine the language and character set information
used in the content.
Field Summary |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
LCSDetectionInputStream(InputStream in)
Constructs the default LCS Detector input stream object. |
|
LCSDetectionInputStream(InputStream in,
int size)
Constructs the default LCS Detector input stream object with the sampling length. |
|
LCSDetectionInputStream(String profile,
InputStream in)
Constructs the LCS Detector input stream object using the specified LCSD profile. |
|
LCSDetectionInputStream(String profile,
InputStream in,
int size)
Constructs the LCS Detector input stream object using the specified LCSD profile, input stream object, and sampling length. |
Method Summary | |
oracle.i18n.lcsd.LCSDResultSet |
getResult()
Returns the result set of LCSD. |
int |
read()
Reads the next byte of data from the input stream. |
int |
read(byte[] b)
Reads some number of bytes from the input stream and stores them into the buffer array b . |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream into an
array of bytes. |
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LCSDetectionInputStream(InputStream in) throws IOException, UTFDataFormatException
in
- the input stream to be sampled by the detector
IOException
- if any I/O error occurs
UTFDataFormatException
- if an UTF-8 data sequence is detected.
Note this occurs only if the source is UTF-8 data.public LCSDetectionInputStream(InputStream in, int size) throws IOException, UTFDataFormatException
in
- the input stream to be sampled by the detectorsize
- the sampling size
IOException
- if any I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.public LCSDetectionInputStream(String profile, InputStream in) throws IOException, UTFDataFormatException
profile
- the LCSD profile name. Specify null
for the
default profile.in
- the input stream to be sampled by the detector
IOException
- if any I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.public LCSDetectionInputStream(String profile, InputStream in, int size) throws IOException, UTFDataFormatException
The sampling is performed for the specified length. The detection result does not change until the read operation exceeds the specified length. Each minimum data length will be sampled afterwards.
profile
- the LCSD profile name. Specify null
for the
default profile.in
- the input stream to be sampled by the detectorsize
- the sampling length
IOException
- if any I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.Method Detail |
public oracle.i18n.lcsd.LCSDResultSet getResult() throws IOException, EOFException, UTFDataFormatException
If your application requires information about the language, the character set, or both, call this method.
IOException
- if an I/O error occurs
EOFException
- if the stream ends unexpectedly
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.public int read() throws IOException, UTFDataFormatException
read
in class FilterInputStream
-1
if the end of the
stream is reached.
IOException
- if an I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.public int read(byte[] b) throws IOException, UTFDataFormatException
b
.
read
in class FilterInputStream
b
- the buffer into which the data is read
-1
if there is no more data because the end of the stream has been
reached.
IOException
- if an I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.public int read(byte[] b, int off, int len) throws IOException, UTFDataFormatException
len
bytes of data from the input stream into an
array of bytes.
read
in class FilterInputStream
b
- the buffer into which the data is readoff
- the start offset in array b
to where the data is writtenlen
- the maximum number of bytes to read
-1
if there is no more data because the end of the stream has been
reached.
IOException
- if an I/O error occurs
UTFDataFormatException
- if an invalid UTF-8 data sequence is
detected. Note this occurs only if the source is UTF-8 data.
|
Oracle® Database Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |