Class ModuleRef.ModuleReaderProxy

    • Method Detail

      • list

        public List<String> list()
                          throws Exception
        Get the list of resources accessible to a ModuleReader. From the documentation for ModuleReader#list(): "Whether the stream of elements includes names corresponding to directories in the module is module reader specific. In lazy implementations then an IOException may be thrown when using the stream to list the module contents. If this occurs then the IOException will be wrapped in an java.io.UncheckedIOException and thrown from the method that caused the access to be attempted. SecurityException may also be thrown when using the stream to list the module contents and access is denied by the security manager."
        Throws:
        Exception
      • read

        public ByteBuffer read​(String name)
                        throws Exception,
                               OutOfMemoryError
        Use the proxied ModuleReader to open the named resource as a ByteBuffer. Call release(byteBuffer) when you have finished with the ByteBuffer.
        Throws:
        OutOfMemoryError - if the resource is larger than Integer.MAX_VALUE, the maximum capacity of a byte buffer.
        Exception
      • release

        public void release​(ByteBuffer byteBuffer)
        Release a ByteBuffer allocated by calling read(name).