|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.japi.io.Copier
public class Copier
A Runnable that copies from an InputStream to an OutputStream.
Field Summary | |
---|---|
static boolean |
DEFAULT_AUTO_CLOSE
Default automatic close. |
static boolean |
DEFAULT_AUTO_FLUSH
Default automatic flush. |
static int |
DEFAULT_BUF_SIZE
Default buffer size when copying. |
Constructor Summary | |
---|---|
Copier(InputStream in,
OutputStream out)
Create a Copier with default buffer size and autoFlush. |
|
Copier(InputStream in,
OutputStream out,
int bufSize)
Create a Copier with specified buffer size and automatic flush behaviour. |
|
Copier(InputStream in,
OutputStream out,
int bufSize,
boolean autoFlush,
boolean autoClose)
Create a Copier with specified buffer size and specified flush behaviour. |
Method Summary | |
---|---|
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
Thread |
start()
Start the copier in a new thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUF_SIZE
public static final boolean DEFAULT_AUTO_FLUSH
public static final boolean DEFAULT_AUTO_CLOSE
Constructor Detail |
---|
public Copier(InputStream in, OutputStream out)
in
- the InputStream to read fromout
- the OutputStream to write topublic Copier(InputStream in, OutputStream out, int bufSize)
in
- the InputStream to read fromout
- the OutputStream to write tobufSize
- buffer size to use while copyingpublic Copier(InputStream in, OutputStream out, int bufSize, boolean autoFlush, boolean autoClose)
in
- the InputStream to read fromout
- the OutputStream to write tobufSize
- buffer size to use while copyingautoFlush
- whether to flush automatically (true for automatic flush, false for flush on close)autoClose
- whether to close the streams automatically (true for automatic close, false for no close)Method Detail |
---|
public Thread start()
public void run()
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface Runnable
Thread.run()
|
JAPI Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |