Bibi
19 Oct 2005 21:04

ujap.bibi
Class ManualBibtexFileReader

java.lang.Object
  extended byujap.bibi.ManualBibtexFileReader

public class ManualBibtexFileReader
extends Object


Nested Class Summary
private static class ManualBibtexFileReader.ReturnValue
           
 
Field Summary
private  int line
           
private  org.apache.log4j.Category LOG
           
private static int LOOK_FOR_FIELD
           
private static int LOOK_FOR_TYPE
           
private  PushbackReader push
           
private  BufferedReader r
           
 
Constructor Summary
ManualBibtexFileReader(File file)
          A ManualBibtexFileReader that reads BibTeX entries from the given file, using a FileReader.
ManualBibtexFileReader(Reader f)
          A ManualBibtexFileReader that reads BibTeX entries from a Reader.
ManualBibtexFileReader(String file)
          A ManualBibtexFileReader that reads BibTeX entries from the file with the specified name, using a FileReader.
 
Method Summary
private  boolean isWhitespace(char c)
           
private  ManualBibtexFileReader.ReturnValue lookFor(String a, char c)
          will always return a value >= 0 (i.e.
private  char readChar()
           
 Bibfile readFile()
          entry point.
private  String readName()
          read a field name, including the following '=' sign and ignoring whitespace
may return null if the entry is finished here.
private  String readValue()
          read a field value, can span multiple lines, must be in one of the following formats: "surrounded by double quotes and followed by a comma, without containing double quotes inside.", {surrounded by curly brackets and followed by a comma.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOOK_FOR_TYPE

private static final int LOOK_FOR_TYPE
See Also:
Constant Field Values

LOOK_FOR_FIELD

private static final int LOOK_FOR_FIELD
See Also:
Constant Field Values

LOG

private org.apache.log4j.Category LOG

line

private int line

r

private BufferedReader r

push

private PushbackReader push
Constructor Detail

ManualBibtexFileReader

public ManualBibtexFileReader(String file)
                       throws IOException
A ManualBibtexFileReader that reads BibTeX entries from the file with the specified name, using a FileReader.


ManualBibtexFileReader

public ManualBibtexFileReader(File file)
                       throws IOException
A ManualBibtexFileReader that reads BibTeX entries from the given file, using a FileReader.


ManualBibtexFileReader

public ManualBibtexFileReader(Reader f)
A ManualBibtexFileReader that reads BibTeX entries from a Reader.

Method Detail

readFile

public Bibfile readFile()
                 throws IOException,
                        ParseException
entry point.

Throws:
IOException
ParseException

lookFor

private ManualBibtexFileReader.ReturnValue lookFor(String a,
                                                   char c)
                                            throws IOException,
                                                   ParseException
will always return a value >= 0 (i.e. never -1) if char was not found, it will throw a parseexception

Parameters:
a -
c -
Returns:
Throws:
IOException
ParseException

readName

private String readName()
                 throws IOException,
                        ParseException
read a field name, including the following '=' sign and ignoring whitespace
may return null if the entry is finished here.

Throws:
IOException
ParseException

isWhitespace

private boolean isWhitespace(char c)

readValue

private String readValue()
                  throws IOException,
                         ParseException
read a field value, can span multiple lines, must be in one of the following formats:

Throws:
IOException
ParseException

readChar

private char readChar()
               throws IOException
Throws:
IOException

Bibi
19 Oct 2005 21:04

Copyright ? 2002-2005 Ute Platzer. All Rights Reserved.