public class StreamUtil extends Object
Title: Stream Utility Class
Description: Does useful things with streams
Copyright: Copyright (c) 2006
| Modifier and Type | Field and Description |
|---|---|
static int |
CHUNKSIZE |
static com.peterphi.std.io.StreamUtil.DummyMonitor |
DUMMY_MONITOR
A monitor which does nothing
|
static int |
MONITOR_UPDATE_INTERVAL |
static int |
STREAM_SLEEP_TIME |
| Modifier and Type | Method and Description |
|---|---|
static void |
doBackgroundCopy(InputStream isI,
OutputStream osI) |
static void |
doBackgroundCopy(InputStream is,
OutputStream os,
ICopyProgressMonitor monitor) |
static void |
doBackgroundCopy(InputStream is,
OutputStream os,
ICopyProgressMonitor monitor,
boolean closeOutput,
boolean closeInput) |
static long |
eatInputStream(InputStream is)
Eats an inputstream, discarding its contents
|
static InputStream |
routeStreamThroughProcess(Process p,
InputStream origin,
boolean closeInput)
Given a Process, this function will route the flow of data through it & out again
|
static void |
streamCopy(InputStream in,
OutputStream out) |
static void |
streamCopy(InputStream in,
OutputStream out,
ICopyProgressMonitor monitor) |
static void |
streamCopy(InputStream input,
Writer output)
Copies the contents of an InputStream, using the default encoding, into a Writer
|
static void |
streamCopy(Reader reader,
Writer writer) |
public static final int STREAM_SLEEP_TIME
public static final int CHUNKSIZE
public static final int MONITOR_UPDATE_INTERVAL
public static final com.peterphi.std.io.StreamUtil.DummyMonitor DUMMY_MONITOR
public static InputStream routeStreamThroughProcess(Process p, InputStream origin, boolean closeInput)
p - origin - closeInput - public static long eatInputStream(InputStream is)
is - InputStream The input stream to read to the end ofpublic static void doBackgroundCopy(InputStream isI, OutputStream osI)
public static void doBackgroundCopy(InputStream is, OutputStream os, ICopyProgressMonitor monitor)
public static void doBackgroundCopy(InputStream is, OutputStream os, ICopyProgressMonitor monitor, boolean closeOutput, boolean closeInput)
public static void streamCopy(InputStream in, OutputStream out)
public static void streamCopy(InputStream in, OutputStream out, ICopyProgressMonitor monitor)
public static void streamCopy(Reader reader, Writer writer) throws IOException
IOExceptionpublic static void streamCopy(InputStream input, Writer output) throws IOException
input - output - IOExceptionCopyright © 2017. All rights reserved.