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

Quick Search    Search Deep

org.greenstone.gatherer.util
Class DecodeHTMLReader  view DecodeHTMLReader download DecodeHTMLReader.java

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended byjava.io.PushbackReader
              extended byorg.greenstone.gatherer.util.DecodeHTMLReader

public class DecodeHTMLReader
extends java.io.PushbackReader


Field Summary
 
Fields inherited from class java.io.PushbackReader
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
DecodeHTMLReader(java.io.Reader source)
           
 
Method Summary
private  int decode()
          Retrieve the next character off the stream.
 int read()
          Read a single character.
 int read(char[] cbuf, int off, int len)
          Read characters into a portion of an array.
 boolean ready()
          This method determines whether or not this stream is ready to be read.
 
Methods inherited from class java.io.PushbackReader
close, mark, markSupported, reset, skip, unread, unread, unread
 
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
 

Constructor Detail

DecodeHTMLReader

public DecodeHTMLReader(java.io.Reader source)
Method Detail

read

public int read()
Read a single character.


read

public int read(char[] cbuf,
                int off,
                int len)
Read characters into a portion of an array.


ready

public boolean ready()
Description copied from class: java.io.PushbackReader
This method determines whether or not this stream is ready to be read. If it returns false to indicate that the stream is not ready, any attempt to read from the stream could (but is not guaranteed to) block.

This stream is ready to read if there are either chars waiting to be read in the pushback buffer or if the underlying stream is ready to be read.


decode

private int decode()
Retrieve the next character off the stream. Unfortunately I have to do this a character at a time (which is slow). I also have to keep in mind that if a suspect encoded character turns out not to be I have to replace the extra characters.