ModuleReader does not have a method for getting size hint for a named resource
Luke Hutchison
luke.hutch at gmail.com
Wed Aug 8 05:16:53 UTC 2018
The current ModuleReader API has methods list(), open(String name), and
read(String name). However, there is no way to get the length (file size)
of a resource short of opening or reading the whole resource, then
examining the number of bytes read or mapped. This can lead to unnecessary
resizing of arrays, and therefore unnecessary array copying.
Internally, the resource size is available in
ImageLocation#getUncompressedSize(). Can this be exposed as a size hint in
the ModuleReader API, e.g. in a method ModuleReader#getSizeHint(String
name) ?
More information about the jigsaw-dev
mailing list