Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.go.trove.io
Class UnicodeReader  view UnicodeReader download UnicodeReader.java

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended bycom.go.trove.io.PositionReader
              extended bycom.go.trove.io.EscapeReader
                  extended bycom.go.trove.io.UnicodeReader

public class UnicodeReader
extends EscapeReader

This reader handles unicode escapes in a character stream as defined by The Java Language Specification.

A unicode escape consists of six characters: '\' and 'u' followed by four hexadecimal digits. If the format of the escape is not correct, then the escape is unprocessed. To prevent a correctly formatted unicode escape from being processed, preceed it with another '\'.

Version:
20 , 12/11/00

Nested Class Summary
private static class UnicodeReader.Tester
           
 
Field Summary
private  boolean mEscaped
           
private  char[] mMinibuf
          Just a temporary buffer for holding the four hexadecimal digits.
 
Fields inherited from class com.go.trove.io.EscapeReader
mEscapesEnabled, mSource
 
Fields inherited from class com.go.trove.io.PositionReader
mPosition, mPosReader
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
UnicodeReader(java.io.Reader source)
          A UnicodeReader needs an underlying source Reader.
 
Method Summary
static void main(java.lang.String[] arg)
           
 int read()
          Calls the in.read() method
 
Methods inherited from class com.go.trove.io.EscapeReader
getNextPosition, getOriginalSource, isEscapesEnabled, setEscapesEnabled
 
Methods inherited from class com.go.trove.io.PositionReader
close, read
 
Methods inherited from class java.io.FilterReader
mark, markSupported, ready, reset, skip
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mMinibuf

private char[] mMinibuf
Just a temporary buffer for holding the four hexadecimal digits.


mEscaped

private boolean mEscaped
Constructor Detail

UnicodeReader

public UnicodeReader(java.io.Reader source)
A UnicodeReader needs an underlying source Reader.

Method Detail

read

public int read()
         throws java.io.IOException
Description copied from class: java.io.FilterReader
Calls the in.read() method

Overrides:
read in class PositionReader

main

public static void main(java.lang.String[] arg)
                 throws java.lang.Exception