|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.StreamUtils
public final class StreamUtils
| Nested Class Summary | |
|---|---|
static interface |
StreamUtils.Listener
|
| Method Summary | |
|---|---|
static long |
bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize)
Transfer data from an input to an output stream Buffer the transfer for faster processing throughput |
static long |
bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize,
MD5 aMD5)
Transfer data from an input to an output stream Buffer the transfer for faster processing throughput |
static long |
bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize,
MD5 aMD5,
StreamUtils.Listener listener)
Transfer data from an input to an output stream Buffer the transfer for faster processing throughput |
static java.io.File |
copy(java.io.File from,
java.lang.String toDirectoryPath)
create a file in the directory, with the same name as the file specified and copy it's content |
static java.io.File |
copy(java.io.File from,
java.lang.String toDirectoryPath,
java.lang.String toFileName)
create a file in the directory, with the specified to name and copy the content from the 'from' file |
static long |
eatStream(java.io.InputStream from,
int buffSize)
|
static long |
eatStream(java.io.InputStream from,
int buffSize,
MD5 aMD5)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.io.File copy(java.io.File from,
java.lang.String toDirectoryPath)
throws java.io.IOException
from - File the File whose content needs to be copiedtoDirectoryPath - the path to a directory into which the content must be copied
this directory must already exist
java.io.IOException
public static java.io.File copy(java.io.File from,
java.lang.String toDirectoryPath,
java.lang.String toFileName)
throws java.io.IOException
from - File the File whose content needs to be copiedtoDirectoryPath - the path to a directory into which the content must be copied
this directory must already existtoFileName - the name of the file to be created in the to directory
java.io.IOException
public static long bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize)
throws java.io.IOException
from - InputStream the stream (remote server) to transfer fromto - OutputStream the stream (local file) to transfer tobuffSize - int the size of the buffer, or 65536 if not specified
java.io.IOException
public static long eatStream(java.io.InputStream from,
int buffSize)
throws java.io.IOException
java.io.IOException
public static long eatStream(java.io.InputStream from,
int buffSize,
MD5 aMD5)
throws java.io.IOException
java.io.IOException
public static long bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize,
MD5 aMD5)
throws java.io.IOException
from - InputStream the stream (remote server) to transfer fromto - OutputStream the stream (local file) to transfer tobuffSize - int the size of the buffer, or 65536 if not specifiedaMD5 - MD5 an md5 that is computed from the bytes being streamed
java.io.IOException
public static long bufferedTransfer(java.io.InputStream from,
java.io.OutputStream to,
int buffSize,
MD5 aMD5,
StreamUtils.Listener listener)
throws java.io.IOException
from - InputStream the stream (remote server) to transfer fromto - OutputStream the stream (local file) to transfer tobuffSize - int the size of the buffer, or 65536 if not specifiedaMD5 - MD5 an md5 that is computed from the bytes being streamedlistener - StreamListener a listener which is notified per pass
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||