[
https://issues.apache.org/jira/browse/COMPRESS-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702483#comment-17702483
]
Franck Valentin commented on COMPRESS-581:
------------------------------------------
Hi [~ggregory] ,
yes, I managed to use it: e.g.
{code:java}
private static long calculateOffset(ZipArchiveEntry zipEntry) {
try {
var getLocalHeaderOffset =
ZipArchiveEntry.class.getDeclaredMethod("getLocalHeaderOffset");
getLocalHeaderOffset.setAccessible(true);
return (Long) getLocalHeaderOffset.invoke(zipEntry);
} catch (NoSuchMethodException | InvocationTargetException |
IllegalAccessException e) {
throw new MyProjectException(e);
}
} {code}
> Make getLocalHeaderOffset() public
> ----------------------------------
>
> Key: COMPRESS-581
> URL: https://issues.apache.org/jira/browse/COMPRESS-581
> Project: Commons Compress
> Issue Type: Wish
> Affects Versions: 1.20
> Reporter: Franck Valentin
> Priority: Minor
>
> Hi,
> I use this library to analyse zip files and get the entries and to do so I
> need to get the entries together with their offsets within the archive. I use
> ZipArchiveEntry but the issue is that getLocalHeaderOffset() is protected
> instead of being public.
> Looking at the source code I don't understand the reason behind it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)