| java.lang.Object gruntspud.GruntspudUtil
GruntspudUtil | public class GruntspudUtil (Code) | | Description of the Class
author: magicthize |
Method Summary | |
public static boolean | closeStream(InputStream in) Close an input stream and don't worry about any exceptions, but return
true or false instead. | public static boolean | closeStream(OutputStream out) Close an output stream and don't worry about any exceptions, but return
true or false instead. | public static void | copyStreams(InputStream in, OutputStream out, int buf) Copy the input from one stream to the output of another until EOF. | public static void | copyStreams(InputStream in, OutputStream out, int buf, long bytes) | public static String | encodeXML(String text) | public static String | formatDate(Date date, GruntspudContext context) | public static String | formatFileSize(long size) | public static File | getPreferenceFile(String name, boolean create) | public static CVSRoot | getSelectedGlobalCVSRoot(GruntspudContext context) | public static void | showErrorMessage(Component parent, String title, Throwable exception) | public static void | showErrorMessage(Component parent, String mesg, String title, Throwable exception) | public static void | stackTrace() |
PREFERENCES_DIRECTORY | final public static File PREFERENCES_DIRECTORY(Code) | | |
closeStream | public static boolean closeStream(InputStream in)(Code) | | Close an input stream and don't worry about any exceptions, but return
true or false instead. If null is supplied as they stream
then it is just ignored
Parameters: stream - stream to close closed ok |
closeStream | public static boolean closeStream(OutputStream out)(Code) | | Close an output stream and don't worry about any exceptions, but return
true or false instead. If null is supplied as they stream
then it is just ignored
Parameters: stream - stream to close closed ok |
copyStreams | public static void copyStreams(InputStream in, OutputStream out, int buf) throws IOException(Code) | | Copy the input from one stream to the output of another until EOF. It
is up to the invoker to close the streams.
Parameters: in - input stream Parameters: out - output stream Parameters: buf - buffer size (-1 means don't buffer) |
copyStreams | public static void copyStreams(InputStream in, OutputStream out, int buf, long bytes) throws IOException(Code) | | Copy the input from one stream to the output of another for a number of
bytes (-1 means until EOF)
Parameters: in - input stream Parameters: out - output stream Parameters: buf - buffer size (-1 means don't buffer) Parameters: bytes - bytes to copy |
formatFileSize | public static String formatFileSize(long size)(Code) | | |
getPreferenceFile | public static File getPreferenceFile(String name, boolean create)(Code) | | |
getSelectedGlobalCVSRoot | public static CVSRoot getSelectedGlobalCVSRoot(GruntspudContext context)(Code) | | Gets the selectedGlobalCVSRoot attribute of the GruntspudUtil class
Parameters: host - Description of the Parameter The selectedGlobalCVSRoot value |
showErrorMessage | public static void showErrorMessage(Component parent, String title, Throwable exception)(Code) | | Show an error dialog given an exception
Parameters: component - parent component Parameters: title - Parameters: execption - exception |
showErrorMessage | public static void showErrorMessage(Component parent, String mesg, String title, Throwable exception)(Code) | | Show an error dialog given an exception
Parameters: component - parent component Parameters: mesg - option message Parameters: title - title Parameters: execption - exception |
stackTrace | public static void stackTrace()(Code) | | Create a fake stack trace
|
|
|