static public StreamableOutput output(OutputStream stream, String name) { Objects.requireNonNull(stream, "stream cannot be null"); return new StreamableOutput(stream, (name != null ? name : "<stream>"), null, null); }
static public void copy(StreamableInput input, StreamableOutput output, int bufferSize) throws IOException { copy(input.stream(), output.stream(), bufferSize); }
static public void copy(StreamableInput input, StreamableOutput output, int bufferSize) throws IOException { copy(input.stream(), output.stream(), bufferSize); }
static public StreamableOutput output(OutputStream stream, String name) { Objects.requireNonNull(stream, "stream cannot be null"); return new StreamableOutput(stream, (name != null ? name : "<stream>"), null, null); }
static public StreamableOutput standardOutput() { OutputStream os = new CloseGuardedOutputStream(System.out); return new StreamableOutput(os, "<stdout>", null, null); }
static public StreamableOutput standardError() { OutputStream os = new CloseGuardedOutputStream(System.err); return new StreamableOutput(os, "<stderr>", null, null); }
OutputStream os = pipable.getPipeOutput().stream(); for (String line : lines) { String s = line + "\r\n";
static public StreamableOutput standardOutput() { OutputStream os = new CloseGuardedOutputStream(System.out); return new StreamableOutput(os, "<stdout>", null, null); }
OutputStream os = pipable.getPipeOutput().stream(); for (String line : lines) { String s = line + "\r\n";
static public StreamableOutput standardError() { OutputStream os = new CloseGuardedOutputStream(System.err); return new StreamableOutput(os, "<stderr>", null, null); }
static public StreamableOutput output(Path path) { Objects.requireNonNull(path, "path cannot be null"); return new StreamableOutput(new DeferredFileOutputStream(path), path.getFileName().toString(), path, null); }
static public StreamableOutput output(Path path) { Objects.requireNonNull(path, "path cannot be null"); return new StreamableOutput(new DeferredFileOutputStream(path), path.getFileName().toString(), path, null); }
static public StreamableOutput lineOutput(LineOutputStream.Processor processor, Charset charset) { Objects.requireNonNull(processor, "processor cannot be null"); return new StreamableOutput(new LineOutputStream(processor, charset), "<lines>", null, null); }
static public StreamableOutput lineOutput(LineOutputStream.Processor processor, Charset charset) { Objects.requireNonNull(processor, "processor cannot be null"); return new StreamableOutput(new LineOutputStream(processor, charset), "<lines>", null, null); }
static public StreamableOutput nullOutput() { return new StreamableOutput(new NullOutputStream(), "<null>", null, null); }
static public StreamableOutput nullOutput() { return new StreamableOutput(new NullOutputStream(), "<null>", null, null); }