AutoCloseablepublic 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 AutoCloseableExceptionpublic List<String> list() throws Exception
Exceptionpublic InputStream open(String name) throws Exception
Exceptionpublic ByteBuffer read(String name) throws Exception, OutOfMemoryError
OutOfMemoryError - if the resource is larger than Integer.MAX_VALUE, the maximum capacity of a byte buffer.Exceptionpublic void release(ByteBuffer byteBuffer)
Copyright © 2018. All rights reserved.