protected InputStreamAccess buildByteBasedInputStreamAccess(final String name, InputStream inputStream) {
// because of how jar InputStreams work we need to extract the bytes immediately. However, we
// do delay the creation of the ByteArrayInputStreams until needed
final byte[] bytes = ArchiveHelper.getBytesFromInputStreamSafely( inputStream );
return new ByteArrayInputStreamAccess( name, bytes );
}