< prev index next >
src/java.desktop/share/classes/javax/swing/text/rtf/RTFParser.java
Print this page
*** 52,62 ****
private long binaryBytesLeft; // in a \bin blob?
ByteArrayOutputStream binaryBuf;
private boolean[] savedSpecials;
/** A stream to which to write warnings and debugging information
! * while parsing. This is set to <code>System.out</code> to log
* any anomalous information to stdout. */
protected PrintStream warnings;
// value for the 'state' variable
private final int S_text = 0; // reading random text
--- 52,62 ----
private long binaryBytesLeft; // in a \bin blob?
ByteArrayOutputStream binaryBuf;
private boolean[] savedSpecials;
/** A stream to which to write warnings and debugging information
! * while parsing. This is set to {@code System.out} to log
* any anomalous information to stdout. */
protected PrintStream warnings;
// value for the 'state' variable
private final int S_text = 0; // reading random text
*** 72,82 ****
/** Implemented by subclasses to interpret a parameter-less RTF keyword.
* The keyword is passed without the leading '/' or any delimiting
* whitespace. */
public abstract boolean handleKeyword(String keyword);
/** Implemented by subclasses to interpret a keyword with a parameter.
! * @param keyword The keyword, as with <code>handleKeyword(String)</code>.
* @param parameter The parameter following the keyword. */
public abstract boolean handleKeyword(String keyword, int parameter);
/** Implemented by subclasses to interpret text from the RTF stream. */
public abstract void handleText(String text);
public void handleText(char ch)
--- 72,82 ----
/** Implemented by subclasses to interpret a parameter-less RTF keyword.
* The keyword is passed without the leading '/' or any delimiting
* whitespace. */
public abstract boolean handleKeyword(String keyword);
/** Implemented by subclasses to interpret a keyword with a parameter.
! * @param keyword The keyword, as with {@code handleKeyword(String)}.
* @param parameter The parameter following the keyword. */
public abstract boolean handleKeyword(String keyword, int parameter);
/** Implemented by subclasses to interpret text from the RTF stream. */
public abstract void handleText(String text);
public void handleText(char ch)
*** 305,315 ****
handleText(currentCharacters.toString());
currentCharacters = new StringBuffer();
}
}
! /** Closes the parser. Currently, this simply does a <code>flush()</code>,
* followed by some minimal consistency checks. */
public void close()
throws IOException
{
flush();
--- 305,315 ----
handleText(currentCharacters.toString());
currentCharacters = new StringBuffer();
}
}
! /** Closes the parser. Currently, this simply does a {@code flush()},
* followed by some minimal consistency checks. */
public void close()
throws IOException
{
flush();
< prev index next >