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_NILstatic intCTRL_OPENLSTstatic intCTRL_OPENNDXstatic intCTRL_SKIPstatic intTYP_BOOLstatic intTYP_CTRLstatic intTYP_DATAstatic intTYP_INTstatic intTYP_INTMstatic intTYP_INTPstatic intTYP_LONGstatic intTYP_REALstatic intTYP_STR
 -  
        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.byte[]getData()Read a data block from the input stream.static byte[]getData(java.nio.ByteBuffer bb)Read a data block 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_DATApublic static final int TYP_DATA - 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
 
 -  CTRL_NILpublic static final int CTRL_NIL - 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
 
 -  getDatapublic byte[] getData() throws java.io.IOExceptionRead a data block from the input stream.- Returns:
- next data block as an array of bytes or null for an empty block
- 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 data block
- 
         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
 
 -  getDatapublic static byte[] getData(java.nio.ByteBuffer bb) throws java.io.IOExceptionRead a data block from given buffer.- Parameters:
- 
         bb- buffer from where data is read
- Returns:
- next data block as an array of bytes or null for an empty block
- 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 data block
- 
         java.io.IOException
 
 -  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
 
 
-  
 
-  
        
© 2001-2023 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
 
