public class ModuleReaderProxy
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Calls ModuleReader#close().
|
java.util.List<java.lang.String> |
list()
Get the list of resources accessible to a ModuleReader.
|
java.io.InputStream |
open(java.lang.String path)
Use the proxied ModuleReader to open the named resource as an InputStream.
|
java.nio.ByteBuffer |
read(java.lang.String path)
Use the proxied ModuleReader to open the named resource as a ByteBuffer.
|
void |
release(java.nio.ByteBuffer byteBuffer)
Release a
ByteBuffer allocated by calling read(String). |
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.util.List<java.lang.String> list()
throws java.lang.SecurityException
java.lang.SecurityException - If the module cannot be accessed.public java.io.InputStream open(java.lang.String path)
throws java.lang.SecurityException
path - The path to the resource to open.InputStream for the content of the resource.java.lang.SecurityException - If the module cannot be accessed.java.lang.IllegalArgumentException - If the module cannot be accessed.public java.nio.ByteBuffer read(java.lang.String path)
throws java.lang.SecurityException,
java.lang.OutOfMemoryError
release(ByteBuffer)
when you have finished with the ByteBuffer.path - The path to the resource to open.ByteBuffer for the content of the resource.java.lang.SecurityException - If the module cannot be accessed.java.lang.OutOfMemoryError - if the resource is larger than 2GB, the maximum capacity of a byte buffer.public void release(java.nio.ByteBuffer byteBuffer)
ByteBuffer allocated by calling read(String).byteBuffer - The ByteBuffer to release.