private void readObject(final ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); try { load(s); } catch (ConfigurationException e) { throw new RuntimeException(e); } } }
private void readObject( final ObjectInputStream s ) throws IOException, ClassNotFoundException { s.defaultReadObject(); try { load( s ); } catch ( ConfigurationException e ) { throw new RuntimeException( e ); } } }
private void readObject( final ObjectInputStream s ) throws IOException, ClassNotFoundException { s.defaultReadObject(); try { load( s ); } catch ( ConfigurationException e ) { throw new RuntimeException( e ); } } }
public static Properties loadProperties( final IOFactory ioFactory, final String filename ) throws ConfigurationException, IOException { final Properties properties = new Properties(); final InputStream propertiesInputStream = ioFactory.getInputStream( filename ); properties.load(propertiesInputStream ); propertiesInputStream.close(); return properties; }
public static Properties loadProperties( final IOFactory ioFactory, final String filename ) throws ConfigurationException, IOException { final Properties properties = new Properties(); final InputStream propertiesInputStream = ioFactory.getInputStream( filename ); properties.load(propertiesInputStream ); propertiesInputStream.close(); return properties; }
public static BatchDetails batchEndPoints(File indexDirectory) throws IOException, ConfigurationException { BatchDetails details = new BatchDetails(); long totalDocs = 0; File[] subIndexes = indexDirectory.listFiles(INDEX_NAME_FILTER); if(subIndexes.length == 0) { throw new RuntimeException("Index has no AtomicIndexes!"); } details.names = subIndexes[0].list(BATCH_NAME_FILTER); java.util.Arrays.sort(details.names, BATCH_COMPARATOR); details.endPoints = new long[details.names.length]; for(int i = 0; i < details.names.length; i++) { Properties batchProps = new Properties(); try(FileInputStream propsIn = new FileInputStream(new File(new File(subIndexes[0], details.names[i]), subIndexes[0].getName() + ".properties"))) { batchProps.load(propsIn); } totalDocs += batchProps.getLong("documents"); details.endPoints[i] = totalDocs; } return details; }
new FileInputStream(stashedIndexBasename + DiskBasedIndex.PROPERTIES_EXTENSION)) { stashedProps.load(stashedPropsStream);
new FileInputStream(stashedIndexBasename + DiskBasedIndex.PROPERTIES_EXTENSION)) { stashedProps.load(stashedPropsStream);