|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.selenium.server.IOHelper
public class IOHelper
Utility class for java.io annoyances.
| Constructor Summary | |
|---|---|
IOHelper()
|
|
| Method Summary | |
|---|---|
static void |
close(java.io.InputStream stream)
|
static void |
copyStream(java.io.InputStream in,
java.io.OutputStream out)
Copy remaining stream content to another stream. |
static void |
copyStream(java.io.InputStream in,
java.io.OutputStream out,
int copyBufferSize)
Copy remaining stream content to another stream. |
static byte[] |
readFile(java.lang.String filePath)
Read a file on the file system and return its content as a stream of bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOHelper()
| Method Detail |
|---|
public static void close(java.io.InputStream stream)
public static byte[] readFile(java.lang.String filePath)
throws java.io.IOException
filePath - Path of the file to read. Cannot be null.
java.io.IOException - on error
public static void copyStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - Input stream to copy (remaining) content from. Cannot be null.out - Output stream to copy content to. Cannot be null.
java.io.IOException - on IO error.
java.lang.AssertionError - If in or out is null.
public static void copyStream(java.io.InputStream in,
java.io.OutputStream out,
int copyBufferSize)
throws java.io.IOException
in - Input stream to copy (remaining) content from. Cannot be null.out - Output stream to copy content to. Cannot be null.copyBufferSize - Size of the maximum chunk of data that will be copied in one step. A
buffer a this size will be allocated internally so beware of the usual speed vs. memory
tradeoff. Must be strictly positive.
java.io.IOException - on IO error.
java.lang.AssertionError - If copyBufferSize is negative, in is
null or out is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||