|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mysql.management.util.Streams
public class Streams
Stream operation utility methods.
| Field Summary | |
|---|---|
static java.lang.String |
RESOURCE_SEPARATOR
|
| Constructor Summary | |
|---|---|
Streams()
|
|
| Method Summary | |
|---|---|
void |
copy(java.io.InputStream from,
java.io.OutputStream to)
Reads the data from the Input stream and writes to the output stream Buffers each stream. |
void |
createFileFromResource(java.lang.String resourceName,
java.io.File file)
Copies a resource to the location specified by the File parameter. |
void |
expandResourceJar(java.io.File outputDir,
java.lang.String jarResourceName)
If the jar exists as a resource, the contents of the jar will be expanded on the file system in the location specified by the File parameter. |
java.io.InputStream |
getResourceAsStream(java.lang.Class aClass,
java.lang.String name)
Convenience method to check for MissingResource (null stream) |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Uses ClassLoader which loaded Streams.class to obtain resource |
java.util.Properties |
loadProperties(java.lang.String resourceName,
java.io.PrintStream err)
|
java.lang.String |
readString(java.io.InputStream from)
reads the entire contents of stream into a String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESOURCE_SEPARATOR
| Constructor Detail |
|---|
public Streams()
| Method Detail |
|---|
public void copy(java.io.InputStream from,
java.io.OutputStream to)
throws java.io.IOException
java.io.IOException
public java.lang.String readString(java.io.InputStream from)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String name)
java.util.MissingResourceException
public java.io.InputStream getResourceAsStream(java.lang.Class aClass,
java.lang.String name)
java.util.MissingResourceException
public void createFileFromResource(java.lang.String resourceName,
java.io.File file)
public void expandResourceJar(java.io.File outputDir,
java.lang.String jarResourceName)
public java.util.Properties loadProperties(java.lang.String resourceName,
java.io.PrintStream err)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||