@Test public void getOutputStream() throws FileNotFoundException { final OutputStream out = ObjectFile.getOutputStream(this.exists.toString()); assertThat(out, is(not((OutputStream) System.out))); }
public static OutputStream getOutputStream(final boolean split, final int splitSize, final String output) throws FileNotFoundException, IOException { if (split) { int maxObjects; if (splitSize > 0) maxObjects = splitSize/ RandomObjectPopulator.OBJECT_SIZE; else maxObjects = RandomObjectPopulator.MAX_OBJECT_ARG; return new ObjectFileOutputStream(output, maxObjects, RandomObjectPopulator.SUFFIX); } else { return new BufferedOutputStream(getOutputStream(output)); } }
ObjectFile { public static OutputStream getOutputStream(final boolean split, final int splitSize, final String output) throws FileNotFoundException, IOException { if (split) { int maxObjects; if (splitSize > 0) maxObjects = splitSize/ RandomObjectPopulator.OBJECT_SIZE; else maxObjects = RandomObjectPopulator.MAX_OBJECT_ARG; return new ObjectFileOutputStream(output, maxObjects, RandomObjectPopulator.SUFFIX); } else { return new BufferedOutputStream(getOutputStream(output)); } } }
ObjectFile { public static OutputStream getOutputStream(final boolean split, final int splitSize, final String output) throws FileNotFoundException, IOException { if (split) { int maxObjects; if (splitSize > 0) maxObjects = splitSize/ RandomObjectPopulator.OBJECT_SIZE; else maxObjects = RandomObjectPopulator.MAX_OBJECT_ARG; return new ObjectFileOutputStream(output, maxObjects, RandomObjectPopulator.SUFFIX); } else { return new BufferedOutputStream(getOutputStream(output)); } } private  ObjectFile(); }
ObjectFile { public static OutputStream getOutputStream(final boolean split, final int splitSize, final String output) throws FileNotFoundException, IOException { if (split) { int maxObjects; if (splitSize > 0) maxObjects = splitSize/ RandomObjectPopulator.OBJECT_SIZE; else maxObjects = RandomObjectPopulator.MAX_OBJECT_ARG; return new ObjectFileOutputStream(output, maxObjects, RandomObjectPopulator.SUFFIX); } else { return new BufferedOutputStream(getOutputStream(output)); } } private  ObjectFile(); static void main(final String[] args); static InputStream getInputStream(final File input); static OutputStream getOutputStream(final boolean split, final int splitSize,
      final String output); static OutputStream getOutputStream(final String output); static void write(final InputStream in, final OutputStream out, boolean writeVersionHeader); static void read(final InputStream in, final OutputStream out, boolean writeVersionHeader); static void filter(final InputStream in, final OutputStream out, final long minFilesize,
      final long maxFilesize, final int minContainerSuffix, final int maxContainerSuffix,
      final Set<Integer> containerSuffixes, final int minLegalholds, final int maxLegalHolds,
      final long minRetention, final long maxRetention, boolean writeVersionHeader); static void split(final InputStream in, final OutputStream out); static void upgrade(final InputStream in, final OutputStream out); static boolean readFully(final InputStream in, final byte[] b); static void compactObjectFiles(final HashMap<File, Integer> objectFiles, final int maxcount); static void combineFiles(File f1, File f2); static void randomShuffleObjects(final InputStream in, final OutputStream out); static void shuffle(String prefix, String directory, int maxObjects); }
ObjectFile { public static OutputStream getOutputStream(final boolean split, final int splitSize, final String output) throws FileNotFoundException, IOException { if (split) { int maxObjects; if (splitSize > 0) maxObjects = splitSize/ RandomObjectPopulator.OBJECT_SIZE; else maxObjects = RandomObjectPopulator.MAX_OBJECT_ARG; return new ObjectFileOutputStream(output, maxObjects, RandomObjectPopulator.SUFFIX); } else { return new BufferedOutputStream(getOutputStream(output)); } } private  ObjectFile(); static void main(final String[] args); static InputStream getInputStream(final File input); static OutputStream getOutputStream(final boolean split, final int splitSize,
      final String output); static OutputStream getOutputStream(final String output); static void write(final InputStream in, final OutputStream out, boolean writeVersionHeader); static void read(final InputStream in, final OutputStream out, boolean writeVersionHeader); static void filter(final InputStream in, final OutputStream out, final long minFilesize,
      final long maxFilesize, final int minContainerSuffix, final int maxContainerSuffix,
      final Set<Integer> containerSuffixes, final int minLegalholds, final int maxLegalHolds,
      final long minRetention, final long maxRetention, boolean writeVersionHeader); static void split(final InputStream in, final OutputStream out); static void upgrade(final InputStream in, final OutputStream out); static boolean readFully(final InputStream in, final byte[] b); static void compactObjectFiles(final HashMap<File, Integer> objectFiles, final int maxcount); static void combineFiles(File f1, File f2); static void randomShuffleObjects(final InputStream in, final OutputStream out); static void shuffle(String prefix, String directory, int maxObjects);  }