| Modifier and Type | Class and Description |
|---|---|
| public static class | IOUtil.
Helper compound associating a class instance and resource paths
to be |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static final boolean | |
| private static WeakReference | |
| private static final Object | |
| private static final String | |
| private static final Pattern | patternSingleBS
RESOURCE / FILE NAME STUFF |
| public static final Pattern | |
| private static File | |
| private static File | |
| private static volatile boolean | |
| public static final String | tmpSubDir
Subdirectory within platform's temporary root directory where all JogAmp related temp files are being stored: |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static StringBuilder | |
| public static String | Returns: clean path string where./ and ../ is resolved,
while keeping a starting ../ at the beginning of a relative path.assuming a slashified path, either denoting a file or directory, either relative or absolute. path)
|
| public static void | |
| public static IOException | close(final Closeable
the stream, final IOException[] Closeable instance to closecache for one saveOneIfFree, final PrintStream IOException to store, if not already used (excess)dump the excess dumpExcess)IOException on this PrintStreamHelper to simplify closing |
| public static byte[] | copyStream2ByteArray(InputStream stream)
Copy the specified input stream to a byte array, which is being returned. |
| public static ByteBuffer | copyStream2ByteBuffer(final InputStream
input stream, which will be wrapped into a BufferedInputStream, if not already done. stream)Copy the specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. |
| public static ByteBuffer | copyStream2ByteBuffer(InputStream
input stream, which will be wrapped into a BufferedInputStream, if not already done. stream, int initial buffer capacity in bytes, if > available bytes initialCapacity)Copy the specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. |
| public static int | copyStream2File(final InputStream
the source in, final File the destination outFile, int informal number of expected bytes, maybe used for user feedback while processing. -1 if unknown totalNumBytes)Copy the specified input stream to the specified output file. |
| public static int | copyStream2Stream(final InputStream
the source in, final OutputStream the destination out, final int informal number of expected bytes, maybe used for user feedback while processing. -1 if unknown totalNumBytes)Copy the specified input stream to the specified output stream. |
| public static int | copyStream2Stream(final int
the intermediate buffer size, should be bufferSize, final InputStream MachineDataInfo#pageSizeInBytes() for best performance.the source in, final OutputStream the destination out, final int informal number of expected bytes, maybe used for user feedback while processing. -1 if unknown totalNumBytes)Copy the specified input stream to the specified output stream. |
| public static int | copyURLConn2File(final URLConnection
the open URLConnection conn, final File the destination outFile)Copy the specified URL resource to the specified output file. |
| public static File | createTempFile(final String prefix, final String suffix, final boolean
true if the temporary root folder needs to hold executable files, otherwise false. executable)Utilizing |
| private static void | |
| public static String | |
| public static String | |
| public static URL | Returns: jar:file:/usr/local/projects/JOGL/gluegen/build-x86_64/gluegen-rt.jar!/com/jogamp/common/util/cache/TempJarCache.classcom.jogamp.common.util.cache.TempJarCache clazzBinName, final ClassLoader ClassLoader to locate the JarFile cl)
|
| public static String | |
| private static String[] | |
| private static String | |
| private static String | |
| private static File | |
| public static FileOutputStream | Returns: outputStream The resulting output stream
|
| public static String | Returns: lowercase suffix of the file namename of the file file)Returns the lowercase suffix of the given file name (the text after the last '.' in the file name). |
| public static String | Returns: lowercase suffix of the file namename of the file filename)Returns the lowercase suffix of the given file name (the text after the last '.' in the file name). |
| private static final Constructor | Returns: the constructor ofjava. if available and
no SecurityManager is installed or privileged access is granted.
Otherwise null.Since usage of |
| private static boolean | |
| private static boolean | |
| public static String | Returns: parent of pathassuming a slashified path, either denotes a file or directory, either relative or absolute. path)
|
| public static String | getRelativeOf(final File
denotes a directory baseLocation, final String denotes a relative file to the baseLocation relativeFile)Generates a path for the 'relativeFile' relative to the 'baseLocation'. |
| public static URLConnection | getResource(final Class<?> context, final String resourcePath)
Deprecated
Use
Locating a resource using IOUtil#getResource(String, ClassLoader, Class) for clarity!
getResource(String, ClassLoader):
|
| public static URLConnection | getResource(final String
the resource path to locate relative or absolute resourcePath, final ClassLoader the optional classLoader, final Class<?> ClassLoader, recommendedrelative context, i.e. position, of the relContext)resourcePath,
to perform the relative lookup, if not null.Locating a resource using
|
| public static URLConnection | getResource(final String resourcePath, final ClassLoader cl)
Locating a resource using the ClassLoader's facilities. |
| private static File | Returns: a temporary directory, writable by this userThis methods finds [and creates] an available temporary sub-directory:
File tmpBaseDir = null;
if(null != testDir(tmpRoot, true, executable)) { // check tmpRoot first
for(int i = 0; null == tmpBaseDir && i<=9999; i++) {
final String tmpDirSuffix = String.format("_%04d", i); // 4 digits for iteration
tmpBaseDir = testDir(new File(tmpRoot, tmpSubDirPrefix+tmpDirSuffix), true, executable);
}
} else {
tmpBaseDir = null;
}
return tmpBaseDir;
|
| public static File | getTempDir(final boolean
true if the user intents to launch executables from the temporary directory, otherwise false. executable)Returns a platform independent writable directory for temporary files
consisting of the platform's |
| public static String | |
| private static boolean | |
| public static URLConnection | |
| public static URLConnection | |
| private static final byte[] | |
| public static String | |
| public static File | testDir(final File
the directory to process dir, final boolean true if the directory shall be created if not existing create, final boolean true if the user intents to launch executables from the temporary directory, otherwise false. executable)Returns the directory |
| public static boolean | testDirExec(final File dir)
Returns true if the given
|
| private static File | |
| public static boolean | |
| private static String |