@Test public void testGetOutput() throws IOException { List<ProvidenceTools> tool = new ArrayList<>(); tool.add(ProvidenceTools.builder() .setIncludesBasePath("foo") .build()); int i = tool.stream() .collect(FormatUtils.getOutput(new ConvertStream(Format.json, null, true, false), false)); assertThat(i, is(12)); assertThat(console.output(), is("eyIxIjoiZm9vIn0K")); assertThat(new String(Base64.decode(console.output()), StandardCharsets.UTF_8), is("{\"1\":\"foo\"}\n")); }
public static <Message extends PMessage<Message, Field>, Field extends PField> Collector<Message, ?, Integer> getOutput(ConvertStream out, boolean strict) throws IOException { Serializer serializer = out.format.createSerializer(strict); return MessageCollectors.toStream(getOutputStream(out), serializer, true); }
FormatUtils { public static <Message extends PMessage<Message, Field>, Field extends PField> Collector<Message, ?, Integer> getOutput(ConvertStream out, boolean strict) throws IOException { Serializer serializer = out.format.createSerializer(strict); return MessageCollectors.toStream(getOutputStream(out), serializer, true); } }
FormatUtils { public static <Message extends PMessage<Message, Field>, Field extends PField> Collector<Message, ?, Integer> getOutput(ConvertStream out, boolean strict) throws IOException { Serializer serializer = out.format.createSerializer(strict); return MessageCollectors.toStream(getOutputStream(out), serializer, true); }  }
FormatUtils { public static <Message extends PMessage<Message, Field>, Field extends PField> Collector<Message, ?, Integer> getOutput(ConvertStream out, boolean strict) throws IOException { Serializer serializer = out.format.createSerializer(strict); return MessageCollectors.toStream(getOutputStream(out), serializer, true); }  static void collectIncludes(File dir, Map<String, File> includes); static void collectConfigIncludes(File rc, Map<String, File> includes); static Map<String, File> getIncludeMap(File rc, List<File> includes); static Stream<Message> getInput(@Nonnull PMessageDescriptor<Message, Field> descriptor,
                             @Nonnull ConvertStream in,
                             boolean strict); static MessageReader getServiceInput(ConvertStream in, boolean strict); static Collector<Message, ?, Integer> getOutput(ConvertStream out,
                                             boolean strict); static MessageWriter getServiceOutput(ConvertStream out, boolean strict); }
FormatUtils { public static <Message extends PMessage<Message, Field>, Field extends PField> Collector<Message, ?, Integer> getOutput(ConvertStream out, boolean strict) throws IOException { Serializer serializer = out.format.createSerializer(strict); return MessageCollectors.toStream(getOutputStream(out), serializer, true); }  static void collectIncludes(File dir, Map<String, File> includes); static void collectConfigIncludes(File rc, Map<String, File> includes); static Map<String, File> getIncludeMap(File rc, List<File> includes); static Stream<Message> getInput(@Nonnull PMessageDescriptor<Message, Field> descriptor,
                             @Nonnull ConvertStream in,
                             boolean strict); static MessageReader getServiceInput(ConvertStream in, boolean strict); static Collector<Message, ?, Integer> getOutput(ConvertStream out,
                                             boolean strict); static MessageWriter getServiceOutput(ConvertStream out, boolean strict);  }