|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Classes | |
| class | ClassResources |
Helper compound associating a class instance and resource paths to be resolved at a later time. More... | |
| class | StreamMonitor |
Static Public Member Functions | |
| static int | copyURLConn2File (final URLConnection conn, final File outFile) throws IOException |
| Copy the complete specified URL resource to the specified output file. More... | |
| static int | copyStream2File (final InputStream in, final File outFile) throws IOException |
| Copy the complete specified input stream to the specified output file. More... | |
| static int | copyStream2Stream (final InputStream in, final OutputStream out) throws IOException |
| Copy the complete specified input stream to the specified output stream. More... | |
| static int | copyStream2Stream (final int bufferSize, final InputStream in, final OutputStream out) throws IOException |
| Copy the complete specified input stream to the specified output stream. More... | |
| static StringBuilder | appendCharStream (final StringBuilder sb, final Reader r) throws IOException |
| static byte[] | copyStream2ByteArray (InputStream stream) throws IOException |
| Copy the complete specified input stream to a byte array, which is being returned. More... | |
| static ByteBuffer | copyStream2ByteBuffer (final InputStream stream) throws IOException |
| Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. More... | |
| static ByteBuffer | copyStream2ByteBuffer (InputStream stream, int initialCapacity) throws IOException |
| Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. More... | |
| static ByteBuffer | copyStreamChunk2ByteBuffer (InputStream stream, int skipBytes, int byteCount) throws IOException |
| Copy the specified input stream chunk to a NIO ByteBuffer w/ native byte order, which is being returned. More... | |
| static String | slashify (final String path, final boolean startWithSlash, final boolean endWithSlash) throws URISyntaxException |
| static String | getFileSuffix (final File file) |
| Returns the lowercase suffix of the given file name (the text after the last '. More... | |
| static String | getFileSuffix (final String filename) |
| Returns the lowercase suffix of the given file name (the text after the last '. More... | |
| static FileOutputStream | getFileOutputStream (final File file, final boolean allowOverwrite) throws IOException |
| static String | getClassFileName (final String clazzBinName) |
| static URL | getClassURL (final String clazzBinName, final ClassLoader cl) throws IOException |
| static String | getBasename (String fname) throws URISyntaxException |
| Returns the basename of the given fname w/o directory part. More... | |
| static String | getDirname (String fname) throws URISyntaxException |
| Returns unified '/' dirname including the last '/'. More... | |
| static URLConnection | getResource (final String resourcePath, final ClassLoader classLoader, final Class<?> relContext) |
Locating a resource using getResource(String, ClassLoader): More... | |
| static URLConnection | getResource (final String resourcePath, final ClassLoader cl) |
| Locating a resource using the ClassLoader's facilities. More... | |
| static String | getRelativeOf (final File baseLocation, final String relativeFile) throws URISyntaxException |
| Generates a path for the 'relativeFile' relative to the 'baseLocation'. More... | |
| static String | getParentOf (final String path) throws URISyntaxException |
| static String | cleanPathString (String path) throws URISyntaxException |
| static String | getUriFilePathOrASCII (final Uri uri) |
If uri is a file scheme implementation returns Uri#toFile(). More... | |
| static URLConnection | openURL (final URL url) |
| Returns the connected URLConnection, or null if not url is not available. More... | |
| static URLConnection | openURL (final URL url, final String dbgmsg) |
| Returns the connected URLConnection, or null if not url is not available. More... | |
| static boolean | testFile (final File file, final boolean shallBeDir, final boolean shallBeWritable) |
Test whether file exists and matches the given requirements. More... | |
| static boolean | testDirExec (final File dir) throws SecurityException |
Returns true if the given dir @endiliteral. More... | |
| static File | testDir (final File dir, final boolean create, final boolean executable) throws SecurityException |
Returns the directory dir, which is processed and tested as described below. More... | |
| static File | getTempDir (final boolean executable) throws SecurityException, IOException |
Returns a platform independent writable directory for temporary files consisting of the platform's temp-root + tmpSubDir, e.g. More... | |
| static File | createTempFile (final String prefix, final String suffix, final boolean executable) throws IllegalArgumentException, IOException, SecurityException |
Utilizing File#createTempFile(String, String, File) using getTempDir(boolean) as the directory parameter, ie. More... | |
| static void | close (final Closeable stream, final boolean throwRuntimeException) throws RuntimeException |
| static IOException | close (final Closeable stream, final IOException[] saveOneIfFree, final PrintStream dumpExcess) |
Helper to simplify closing Closeables. More... | |
| static ArrayList< String > | filesOf (final List< String > paths, final List< Pattern > excludes, final List< Pattern > includes) |
| Retrieve the list of all filenames traversing through given paths. More... | |
Static Public Attributes | |
| static final boolean | DEBUG |
| static final String | tmpSubDir = "jogamp" |
Subdirectory within platform's temporary root directory where all JogAmp related temp files are being stored: jogamp More... | |
| static final Pattern | patternSpaceEnc = Pattern.compile("%20") |
Definition at line 69 of file IOUtil.java.
|
static |
Definition at line 250 of file IOUtil.java.
|
static |
| path | assuming a slashified path, either denoting a file or directory, either relative or absolute. |
./ and ../ is resolved, while keeping a starting ../ at the beginning of a relative path. | URISyntaxException | if path is empty or has no parent directory available while resolving ../ |
Definition at line 712 of file IOUtil.java.
|
static |
|
static |
Helper to simplify closing Closeables.
| stream | the Closeable instance to close |
| saveOneIfFree | cache for one IOException to store, if not already used (excess) |
| dumpExcess | dump the excess IOException on this PrintStream |
IOException or null. Definition at line 1428 of file IOUtil.java.
|
static |
Copy the complete specified input stream to a byte array, which is being returned.
Definition at line 262 of file IOUtil.java.
|
static |
Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned.
| stream | input stream, which will be wrapped into a BufferedInputStream, if not already done. |
Definition at line 297 of file IOUtil.java.
|
static |
Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned.
| stream | input stream, which will be wrapped into a BufferedInputStream, if not already done. |
| initialCapacity | initial buffer capacity in bytes, if < currently available bytes, initial buffer capacity is set to currently available bytes. |
Definition at line 307 of file IOUtil.java.
|
static |
Copy the complete specified input stream to the specified output file.
The total number of bytes written is returned.
| in | the source |
| outFile | the destination |
| IOException |
Definition at line 204 of file IOUtil.java.
|
static |
Copy the complete specified input stream to the specified output stream.
The total number of bytes written is returned.
| in | the source |
| out | the destination |
| IOException |
Definition at line 222 of file IOUtil.java.
|
static |
Copy the complete specified input stream to the specified output stream.
The total number of bytes written is returned.
| bufferSize | the intermediate buffer size, should be MachineDataInfo#pageSizeInBytes() for best performance. |
| in | the source |
| out | the destination |
| IOException |
Definition at line 236 of file IOUtil.java.
|
static |
Copy the specified input stream chunk to a NIO ByteBuffer w/ native byte order, which is being returned.
| stream | input stream, which will be wrapped into a BufferedInputStream, if not already done. |
| skipBytes | initial bytes to skip from input stream. |
| byteCount | bytes to copy starting after skipBytes. |
Definition at line 347 of file IOUtil.java.
|
static |
Copy the complete specified URL resource to the specified output file.
The total number of bytes written is returned.
| conn | the open URLConnection |
| outFile | the destination |
| IOException |
Definition at line 182 of file IOUtil.java.
|
static |
Utilizing File#createTempFile(String, String, File) using getTempDir(boolean) as the directory parameter, ie.
location of the root temp folder.
| prefix | |
| suffix | |
| executable | true if the temporary root folder needs to hold executable files, otherwise false. |
| IllegalArgumentException | |
| IOException | if no temporary directory could be determined or temp file could not be created |
| SecurityException |
Definition at line 1399 of file IOUtil.java.
|
static |
Retrieve the list of all filenames traversing through given paths.
| paths | list of paths to traverse through, containing directories and files |
| excludes | optional list of exclude Pattern. All matching files or directories will be omitted. Maybe be null or empty. |
| includes | optional list of explicit include Pattern. If given, only matching files will be returned, otherwise all occurring. |
Definition at line 1452 of file IOUtil.java.
|
static |
Returns the basename of the given fname w/o directory part.
| URISyntaxException | if path is empty or has no parent directory available while resolving ../ |
Definition at line 486 of file IOUtil.java.
|
static |
|
static |
| clazzBinName | com.jogamp.common.util.cache.TempJarCache |
| cl | ClassLoader to locate the JarFile |
| IOException | if the jar file could not been found by the ClassLoader |
Definition at line 474 of file IOUtil.java.
|
static |
Returns unified '/' dirname including the last '/'.
| URISyntaxException | if path is empty or has no parent directory available while resolving ../ |
Definition at line 499 of file IOUtil.java.
|
static |
Definition at line 448 of file IOUtil.java.
|
static |
Returns the lowercase suffix of the given file name (the text after the last '.
' in the file name). Returns null if the file name has no suffix. Only operates on the given file name; performs no I/O operations.
| file | name of the file |
| NullPointerException | if file is null |
Definition at line 411 of file IOUtil.java.
|
static |
Returns the lowercase suffix of the given file name (the text after the last '.
' in the file name). Returns null if the file name has no suffix. Only operates on the given file name; performs no I/O operations.
| filename | name of the file |
| NullPointerException | if filename is null |
Definition at line 425 of file IOUtil.java.
|
static |
| path | assuming a slashified path, either denotes a file or directory, either relative or absolute. |
| URISyntaxException | if path is empty or has no parent directory available |
Definition at line 670 of file IOUtil.java.
|
static |
Generates a path for the 'relativeFile' relative to the 'baseLocation'.
| baseLocation | denotes a directory |
| relativeFile | denotes a relative file to the baseLocation |
| URISyntaxException | if path is empty or has no parent directory available while resolving ../ |
Definition at line 652 of file IOUtil.java.
|
static |
Locating a resource using the ClassLoader's facilities.
Returns the resolved and connected URLConnection or null if not found.
Definition at line 617 of file IOUtil.java.
|
static |
Locating a resource using getResource(String, ClassLoader):
relContext's package name-path plus resourcePath via classLoader. This allows locations relative to JAR- and other URLs. The resourcePath may start with ../ to navigate to parent folder. This attempt is skipped if relContext is null. resourcePath as is via classLoader. Returns the resolved and open URLConnection or null if not found.
| resourcePath | the resource path to locate relative or absolute |
| classLoader | the optional ClassLoader, recommended |
| relContext | relative context, i.e. position, of the resourcePath, to perform the relative lookup, if not null. |
Definition at line 578 of file IOUtil.java.
|
static |
Returns a platform independent writable directory for temporary files consisting of the platform's temp-root + tmpSubDir, e.g.
/tmp/jogamp_0000/.
On standard Java the temp-root folder is specified by java.io.tempdir.
On Android the temp-root folder is relative to the applications local folder (see Context#getDir(String, int)) is returned, if the Android application/activity has registered it's Application Context via StaticContext.init(..). This allows using the temp folder w/o the need for sdcard access, which would be the java.io.tempdir location on Android!
In case temp-root is the users home folder, a dot is being prepended to tmpSubDir, i.e.: /home/user/.jogamp_0000/.
| executable | true if the user intents to launch executables from the temporary directory, otherwise false. |
| IOException | if no temporary directory could be determined |
| SecurityException | if access to java.io.tmpdir is not allowed within the current security context |
Definition at line 1246 of file IOUtil.java.
|
static |
If uri is a file scheme implementation returns Uri#toFile().
Otherwise it returns the URI#toASCIIString() encoded URI.
Definition at line 744 of file IOUtil.java.
|
static |
Returns the connected URLConnection, or null if not url is not available.
Definition at line 755 of file IOUtil.java.
|
static |
Returns the connected URLConnection, or null if not url is not available.
Definition at line 762 of file IOUtil.java.
|
static |
| path | |
| startWithSlash | |
| endWithSlash |
| URISyntaxException | if path is empty or has no parent directory available while resolving ../ |
Definition at line 389 of file IOUtil.java.
|
static |
Returns the directory dir, which is processed and tested as described below.
create is true and the directory does not exist yet, it is created incl. all sub-directories. dirName exists, but is not a directory, null is being returned. null is being returned. executable is true and files cannot be executed from the directory, null is being returned. | dir | the directory to process |
| create | true if the directory shall be created if not existing |
| executable | true if the user intents to launch executables from the temporary directory, otherwise false. |
| SecurityException | if file creation and process execution is not allowed within the current security context |
Definition at line 1167 of file IOUtil.java.
|
static |
Returns true if the given dir @endiliteral.
| SecurityException | if file creation and process execution is not allowed within the current security context |
| dir |
Definition at line 1018 of file IOUtil.java.
|
static |
Test whether file exists and matches the given requirements.
| file | |
| shallBeDir | |
| shallBeWritable |
Definition at line 918 of file IOUtil.java.
|
static |
Definition at line 70 of file IOUtil.java.
|
static |
Definition at line 735 of file IOUtil.java.
|
static |
Subdirectory within platform's temporary root directory where all JogAmp related temp files are being stored: jogamp
Definition at line 132 of file IOUtil.java.