|
Novell exteNd Director 5.2 API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sssw.fw.util.EboStreamHelper
Useful utility methods to handle frequently duplicated actions on Streams
| Constructor Summary | |
EboStreamHelper()
|
|
| Method Summary | |
static void |
copyOut(InputStream in,
OutputStream out)
Copy the contents of the InputStream to the OutputStream |
static void |
copyOut(Reader in,
Writer out)
Copy the contents of the Reader to the Writer |
static InputStream |
getInputStream(String s)
Create an InputStream for the given String. |
static String |
getString(InputStream in)
Read the contents of the InputStream and return it as a String |
static byte[] |
readFully(File f)
Returns the contents of the file as a byte array |
static byte[] |
readFully(InputStream in)
Returns the contents of the InputStream as a byte array. |
static boolean |
shouldBuffer(InputStream is)
Determine whether or not it will help to wrap the specified InputStream in a BufferedInputStream. |
static boolean |
shouldBuffer(OutputStream is)
Determine whether or not it will help to wrap the specified OutputStream in a BufferedOutputStream. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public EboStreamHelper()
| Method Detail |
public static byte[] readFully(File f)
throws IOException
public static byte[] readFully(InputStream in)
throws Exception
public static InputStream getInputStream(String s)
s - The string used as input to a stream.
public static void copyOut(InputStream in,
OutputStream out)
throws IOException
in - source InputStream of copy requestout - destination OutputStream of copy request
public static void copyOut(Reader in,
Writer out)
throws IOException
in - source Reader of copy requestout - destination Writer of copy request
public static String getString(InputStream in)
throws IOException
in - source InputStream of copy requestpublic static boolean shouldBuffer(InputStream is)
is - Input streampublic static boolean shouldBuffer(OutputStream is)
is - Output stream
|
Novell exteNd Director 5.2 API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||