| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
chemaxon.formats.MolInputStream
Molecule input stream that has the ability to determine the input file format.
| Field Summary | 
| Fields inherited from class java.io.BufferedInputStream | 
buf, count, marklimit, markpos, pos | 
| Fields inherited from class java.io.FilterInputStream | 
in | 
| Constructor Summary | |
MolInputStream(java.io.InputStream is)
Create a molecule input stream from an ordinary one, and determine the format.  | 
|
MolInputStream(java.io.InputStream is,
               java.lang.String fmt)
Create a molecule input stream from an ordinary one, If null is specified as the fmt argument, then the file format is determined automatically.  | 
|
| Method Summary | |
static boolean | 
canBeAbbrevgroup(java.lang.String line)
Utility function that checks if a string can be in abbrevgroup format.  | 
static boolean | 
canBeBase64(java.lang.String line)
Utility function that checks if a string can be base64 encoded data.  | 
static boolean | 
canBeChime(java.lang.String s)
Utility function that checks if a string can be Chime (MDL compressed mol).  | 
static boolean | 
canBeJTF(java.lang.String line)
Determines if a String is valid as the first line of a JTF file.  | 
static boolean | 
canBeSMARTS(java.lang.String s)
Utility function that checks if a string can be SMARTS.  | 
static boolean | 
canBeSMILES(java.lang.String s)
Utility function that checks if a string can be SMILES.  | 
 long | 
getFilePointer()
Get the file pointer.  | 
 java.lang.String | 
getFormat()
Get the molecule file format.  | 
static java.util.Vector | 
getJtfFields(java.lang.String line)
Gets fields delimited with {space} {tab} {;} {:} or {,}.  | 
 int | 
getLineCount()
Gets the current line number.  | 
 void | 
putBackLine()
Puts back the last line into the stream.  | 
 int | 
read()
Reads a character.  | 
 int | 
read(byte[] b,
     int off,
     int len)
Reads a byte array.  | 
 java.lang.String | 
readLine()
Reads a line.  | 
 void | 
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream. | 
 void | 
setFilePointer(long p)
Sets file pointer and initializes buffer.  | 
 long | 
skip(long n)
Skips over and discards n bytes of data.  | 
| Methods inherited from class java.io.BufferedInputStream | 
available, close, mark, markSupported | 
| Methods inherited from class java.io.FilterInputStream | 
read | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public MolInputStream(java.io.InputStream is,
                      java.lang.String fmt)
               throws java.io.IOException
is - the original input streamfmt - the input file format or null
java.io.IOException - error occured while trying to guess the file
                        format
public MolInputStream(java.io.InputStream is)
               throws java.io.IOException
is - the original input stream
java.io.IOException - error occured while trying to guess the file
                        format| Method Detail | 
public int read()
         throws java.io.IOException
java.io.IOException - read error occured
public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
b - the buffer into which the data is read.off - the start offset of the datalen - maximum number of bytes to read
java.io.IOException - read error occured
public long skip(long n)
          throws java.io.IOException
n - the number of bytes
java.io.IOException - read error occured
public void reset()
           throws java.io.IOException
mark method was last called on this input stream.
java.io.IOException - if this stream has not been marked or if the
                         mark has been invalidated.
public java.lang.String readLine()
                          throws java.io.IOException
java.io.IOException - If an I/O error has occurred.public int getLineCount()
public void putBackLine()
                 throws java.io.IOException
java.io.IOException - If an I/O error has occurred.readLine(), 
getFilePointer()public long getFilePointer()
public void setFilePointer(long p)
p - the file pointerpublic java.lang.String getFormat()
public static boolean canBeBase64(java.lang.String line)
line - the input string
public static boolean canBeAbbrevgroup(java.lang.String line)
line - the input string
public static boolean canBeSMARTS(java.lang.String s)
s - the input string
public static boolean canBeSMILES(java.lang.String s)
s - the input string
public static boolean canBeChime(java.lang.String s)
s - the input string
public static boolean canBeJTF(java.lang.String line)
public static java.util.Vector getJtfFields(java.lang.String line)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||