public static PSetupGuess guessSetup ( byte [ ] bits ) { InputStream is = new ByteArrayInputStream ( bits ) ; XlsParser p = new XlsParser ( ) ; CustomInspectDataOut dout = new CustomInspectDataOut ( ) ; try { p . streamParse ( is , dout ) ; } catch ( Exception e ) { } return new PSetupGuess ( new ParserSetup ( ParserType . XLS , CsvParser . AUTO_SEP , dout . _ncols , dout . _header , dout . _header ? dout . data ( ) [ 0 ] : null , false ) , dout . _nlines , dout . _invalidLines , dout . data ( ) , dout . _nlines > dout . _invalidLines , null ) ; }
Try to parse the bits as svm light format return SVMParser instance if the input is in svm light format null otherwise .