@Test public void ofTest() throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); StreamResult<Integer,String> sr = StreamResult.of(null,os); sr.accept(ResultConsumerTest.getProductBin(1,"test")); assertNotNull(sr.getPrintStream()); sr.close(); Tester.removeFile("res_out_test.txt"); StreamResult<Integer,String> sr2 = StreamResult.of(null,new File("res_out_test.txt")); }
public static <K,V> StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform) throws IOException { return new StreamResult<>(os,transform); }
StreamResult implements ResultConsumer<K,V>, Closeable { public static <K,V> StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform) throws IOException { return new StreamResult<>(os,transform); } }
StreamResult implements ResultConsumer<K,V>, Closeable { public static <K,V> StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform) throws IOException { return new StreamResult<>(os,transform); } StreamResult(OutputStream os);  StreamResult(OutputStream os, Function<ProductBin<K,V>,Object> transform); }
StreamResult implements ResultConsumer<K,V>, Closeable { public static <K,V> StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform) throws IOException { return new StreamResult<>(os,transform); } StreamResult(OutputStream os);  StreamResult(OutputStream os, Function<ProductBin<K,V>,Object> transform); @Override void accept(ProductBin<K, V> bin); @Override void close(); ObjectOutputStream getPrintStream(); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, File file, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, File file); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, String file, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, String file); }
StreamResult implements ResultConsumer<K,V>, Closeable { public static <K,V> StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform) throws IOException { return new StreamResult<>(os,transform); } StreamResult(OutputStream os);  StreamResult(OutputStream os, Function<ProductBin<K,V>,Object> transform); @Override void accept(ProductBin<K, V> bin); @Override void close(); ObjectOutputStream getPrintStream(); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, OutputStream os); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, File file, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, File file); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, String file, Function<ProductBin<K,V>,Object> transform); static StreamResult<K,V> of(Conveyor<K, ?, V> conv, String file);  }