org.cdlib.xtf.textIndexer
Class CrimsonBugWorkaround.BlockEnum

Object
  extended by CrimsonBugWorkaround.BlockEnum
All Implemented Interfaces:
Enumeration
Enclosing class:
CrimsonBugWorkaround

private static class CrimsonBugWorkaround.BlockEnum
extends Object
implements Enumeration

Presents the input stream as a series of blocks of data


Field Summary
(package private) static int BLOCK_SIZE
           
(package private)  boolean eof
           
(package private)  InputStream in
           
(package private)  byte[] inBuf
           
(package private)  int inBufLen
           
(package private)  byte[] outBuf
           
(package private)  int outBufLen
           
(package private)  byte prev
           
 
Constructor Summary
CrimsonBugWorkaround.BlockEnum(InputStream in)
           
 
Method Summary
private  void fixBuf()
          Scan through the input buffer, looking for the suspicious pair of characters and sticking a space between them.
 boolean hasMoreElements()
          Tells whether there are more blocks to read
 Object nextElement()
          Gets an InputStream for the next block of data
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_SIZE

static final int BLOCK_SIZE
See Also:
Constant Field Values

in

InputStream in

inBuf

byte[] inBuf

inBufLen

int inBufLen

outBuf

byte[] outBuf

outBufLen

int outBufLen

eof

boolean eof

prev

byte prev
Constructor Detail

CrimsonBugWorkaround.BlockEnum

CrimsonBugWorkaround.BlockEnum(InputStream in)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tells whether there are more blocks to read

Specified by:
hasMoreElements in interface Enumeration

nextElement

public Object nextElement()
Gets an InputStream for the next block of data

Specified by:
nextElement in interface Enumeration

fixBuf

private void fixBuf()
Scan through the input buffer, looking for the suspicious pair of characters and sticking a space between them. The result is in the output buffer.