/** * Constructs a ReaderFactory which tries to detect the format in the * first given number of chars. * * @param headerLength length of the header in number of chars */ public ReaderFactory(int headerLength) { formatFactory = new FormatFactory(headerLength); this.headerLength = headerLength; }
/** * Constructs a ReaderFactory which tries to detect the format in the * first given number of chars. * * @param headerLength length of the header in number of chars */ public ReaderFactory(int headerLength) { formatFactory = new FormatFactory(headerLength); this.headerLength = headerLength; }
@BeforeClass public static void setup() { factory = new FormatFactory(); }
/** * Test that the format factory guesses the correct IChemFormat * based on the file content. * * @throws Exception */ @Test public void testRGFileFormat() throws Exception { String filename = "data/mdl/rgfile.1.mol"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); IChemFormat format = new FormatFactory().guessFormat(new BufferedInputStream(ins)); Assert.assertEquals(format.getClass(), RGroupQueryFormat.class); }
FormatFactory formatFactory = new FormatFactory(8192); IChemFormat format=formatFactory.guessFormat(input);