AutoCloseable
public static class ModuleRef.ModuleReaderProxy extends Object implements AutoCloseable
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
List<String> |
list() |
Get the list of resources accessible to a ModuleReader.
|
InputStream |
open(String name) |
Use the proxied ModuleReader to open the named resource as an InputStream.
|
ByteBuffer |
read(String name) |
Use the proxied ModuleReader to open the named resource as a ByteBuffer.
|
void |
release(ByteBuffer byteBuffer) |
Release a ByteBuffer allocated by calling read(name).
|
public void close() throws Exception
close
in interface AutoCloseable
Exception
public List<String> list() throws Exception
Exception
public InputStream open(String name) throws Exception
Exception
public ByteBuffer read(String name) throws Exception, OutOfMemoryError
OutOfMemoryError
- if the resource is larger than Integer.MAX_VALUE, the maximum capacity of a byte buffer.Exception
public void release(ByteBuffer byteBuffer)
Copyright © 2018. All rights reserved.