chemaxon.formats.recognizer
Class Base64Recognizer

java.lang.Object
  extended by chemaxon.formats.recognizer.Recognizer
      extended by chemaxon.formats.recognizer.Base64Recognizer

public class Base64Recognizer
extends Recognizer

BASE64 format recognizer.

Since:
Marvin 5.0, 06/07/2007
Version:
5.1, 07/29/2008
Author:
Peter Csizmadia

Constructor Summary
Base64Recognizer(java.lang.String fmt)
          Creates a Base64 format recognizer.
 
Method Summary
static boolean canBeBase64(java.lang.String line)
          Tests whether a string can be base64 encoded data.
 boolean needsMore()
          Should we read more lines?
 void tryToRecognize(java.lang.String line, int linenum, RecognizerList reclist)
          Tries to recognize a line.
 
Methods inherited from class chemaxon.formats.recognizer.Recognizer
getLastProcessedLineNum, getPriority, isLastLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Recognizer

public Base64Recognizer(java.lang.String fmt)
Creates a Base64 format recognizer.

Parameters:
fmt - the codename of the format
Method Detail

tryToRecognize

public void tryToRecognize(java.lang.String line,
                           int linenum,
                           RecognizerList reclist)
Tries to recognize a line. If a format becomes impossible, then it is removed from the set of possible formats.

Specified by:
tryToRecognize in class Recognizer
Parameters:
line - the line
linenum - the line number
reclist - the list of recognizers

needsMore

public boolean needsMore()
Should we read more lines?

Specified by:
needsMore in class Recognizer
Returns:
true if more lines are needed, false otherwise

canBeBase64

public static boolean canBeBase64(java.lang.String line)
Tests whether a string can be base64 encoded data.

Parameters:
line - the input string
Returns:
true if it can be, false if it can not be base 64