BinDrvReader
- java.lang.Object
-  
  - com.dashoptimization.BinDrvReader
 
-  
   
 
 public class BinDrvReader extends java.lang.ObjectA class to read Mosel's 'bin' data
-  
    
   -  
        Field SummaryModifier and Type Field and Description static intCTRL_CLOSELSTstatic intCTRL_CLOSENDXstatic intCTRL_LABELstatic intCTRL_OPENLSTstatic intCTRL_OPENNDXstatic intCTRL_SKIPstatic intTYP_BOOLstatic intTYP_CTRLstatic intTYP_INTstatic intTYP_INTMstatic intTYP_INTPstatic intTYP_LONGstatic intTYP_REALstatic intTYP_STRstatic intTYP_VOID
 -  
        Constructor SummaryConstructor and Description BinDrvReader(java.io.InputStream inf)Create a 'BinDrvReader' from an InputStream setting UTF-8 as the encoding.BinDrvReader(java.io.InputStream inf, java.lang.String enc)Create a 'BinDrvReader' from an InputStream.
 -  
        Method SummaryModifier and Type Method and Description booleangetBoolean()Read a Boolean from the input stream.static booleangetBoolean(java.nio.ByteBuffer bb)Read a Boolean from given buffer.intgetControl()Read a control code from the input stream.static intgetControl(java.nio.ByteBuffer bb)Read a control code from given buffer.intgetInt()Read an integer from the input stream.static intgetInt(java.nio.ByteBuffer bb)Read an integer from given buffer.longgetLong()Read a long integer from the input stream.static longgetLong(java.nio.ByteBuffer bb)Read a long integer from given buffer.doublegetReal()Read a real (double) from the input stream.static doublegetReal(java.nio.ByteBuffer bb)Read a real (double) from given buffer.java.lang.StringgetString()Read a text string from the input stream.static java.lang.StringgetString(java.nio.ByteBuffer bb)Read a text string from the given buffer using the UTF-8 encoding.static java.lang.StringgetString(java.nio.ByteBuffer bb, java.lang.String enc)Read a text string from given buffer.intnextToken()Get the type of the next available token.static intnextToken(java.nio.ByteBuffer bb)Get the type of the next available token.
 
-  
        
-  
    
   -  
        Field Detail-  TYP_INTPpublic static final int TYP_INTP - See Also:
- Constant Field Values
 
 -  TYP_INTMpublic static final int TYP_INTM - See Also:
- Constant Field Values
 
 -  TYP_INTpublic static final int TYP_INT - See Also:
- Constant Field Values
 
 -  TYP_VOIDpublic static final int TYP_VOID - See Also:
- Constant Field Values
 
 -  TYP_REALpublic static final int TYP_REAL - See Also:
- Constant Field Values
 
 -  TYP_STRpublic static final int TYP_STR - See Also:
- Constant Field Values
 
 -  TYP_BOOLpublic static final int TYP_BOOL - See Also:
- Constant Field Values
 
 -  TYP_CTRLpublic static final int TYP_CTRL - See Also:
- Constant Field Values
 
 -  TYP_LONGpublic static final int TYP_LONG - See Also:
- Constant Field Values
 
 -  CTRL_SKIPpublic static final int CTRL_SKIP - See Also:
- Constant Field Values
 
 -  CTRL_LABELpublic static final int CTRL_LABEL - See Also:
- Constant Field Values
 
 -  CTRL_OPENLSTpublic static final int CTRL_OPENLST - See Also:
- Constant Field Values
 
 -  CTRL_CLOSELSTpublic static final int CTRL_CLOSELST - See Also:
- Constant Field Values
 
 -  CTRL_OPENNDXpublic static final int CTRL_OPENNDX - See Also:
- Constant Field Values
 
 -  CTRL_CLOSENDXpublic static final int CTRL_CLOSENDX - See Also:
- Constant Field Values
 
 
-  
 -  
        Constructor Detail-  BinDrvReaderpublic BinDrvReader(java.io.InputStream inf, java.lang.String enc)Create a 'BinDrvReader' from an InputStream.- Parameters:
- 
         inf- stream from which data is read
- 
         enc- character encoding
 
 -  BinDrvReaderpublic BinDrvReader(java.io.InputStream inf) Create a 'BinDrvReader' from an InputStream setting UTF-8 as the encoding.- Parameters:
- 
         inf- stream from which data is read
 
 
-  
 -  
        Method Detail-  nextTokenpublic int nextToken() throws java.io.IOExceptionGet the type of the next available token.- Returns:
- 
         the next token type or 
         -1in case of end of file
- Throws:
- 
         java.io.IOException- in case of IO error
 
 -  getIntpublic int getInt() throws java.io.IOExceptionRead an integer from the input stream.- Returns:
- next integer
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not an integer
- 
         java.io.IOException
 
 -  getLongpublic long getLong() throws java.io.IOExceptionRead a long integer from the input stream.- Returns:
- next long integer
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not an integer
- 
         java.io.IOException
 
 -  getRealpublic double getReal() throws java.io.IOExceptionRead a real (double) from the input stream.- Returns:
- next real
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not a real
- 
         java.io.IOException
 
 -  getBooleanpublic boolean getBoolean() throws java.io.IOExceptionRead a Boolean from the input stream.- Returns:
- next Boolean
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not a Boolean
- 
         java.io.IOException
 
 -  getStringpublic java.lang.String getString() throws java.io.IOExceptionRead a text string from the input stream.- Returns:
- next text string
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not a string
- 
         java.io.IOException
 
 -  getControlpublic int getControl() throws java.io.IOExceptionRead a control code from the input stream.- Returns:
- next control code
- Throws:
- 
         java.io.EOFException- if trying to read after the end of stream or an IOException in case of read error or the next token is not a control code
- 
         java.io.IOException
 
 -  nextTokenpublic static int nextToken(java.nio.ByteBuffer bb) Get the type of the next available token.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- 
         the next token type or 
         -1in case of end of buffer
 
 -  getIntpublic static int getInt(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead an integer from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next integer
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not an integer
 
 -  getLongpublic static long getLong(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead a long integer from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next long integer
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not an integer
 
 -  getRealpublic static double getReal(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead a real (double) from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next real
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not a real
 
 -  getBooleanpublic static boolean getBoolean(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead a Boolean from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next Boolean
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not a Boolean
 
 -  getStringpublic static java.lang.String getString(java.nio.ByteBuffer bb, java.lang.String enc) throws java.io.EOFExceptionRead a text string from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- 
         enc- character encoding
- Returns:
- next text string
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not a string
 
 -  getStringpublic static java.lang.String getString(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead a text string from the given buffer using the UTF-8 encoding.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next text string
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not a string
 
 -  getControlpublic static int getControl(java.nio.ByteBuffer bb) throws java.io.EOFExceptionRead a control code from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next control code
- Throws:
- 
         java.io.EOFException- if trying to read after the end of the buffer or a RuntimeException in case the next token is not a control code
 
 
-  
 
-  
        
 
