2362N/A * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A byte ixTag;
// type of entries (!= CONSTANT_None), plus 64 if sub-index 0N/A // Position and size of each homogeneous subrange: 0N/A // Well-known Utf8 symbols. 0N/A // read counts from hdr, allocate main arrays 0N/A // pointer to outer unpacker, for error checks etc. 0N/A * The unpacker provides the entry points to the unpack engine, 0N/A * as well as maintains the state of the engine. 0N/A // One element of the resulting JAR. 0N/A // Note: If Sum(data[*].len) < size, 0N/A // remaining bytes must be read directly from the input stream. 0N/A // back pointer to NativeUnpacker obj and Java environment 0N/A // global pointer to self, if not running under JNI (not multi-thread safe) 0N/A // if running Unix-style, here are the inputs and outputs 0N/A // pointer to self, for U_NEW macro 0N/A // private abort message string, allocated to PATH_MAX*2 0N/A // option management members 0N/A byte*
rp;
// read pointer (< rplimit <= input.limit()) 0N/A // callback to read at least one byte, up to available input 0N/A // archive header fields 0N/A byte*
wp;
// write pointer (< wplimit == output.limit()) 0N/A // stats pertaining to multiple segments (updated on reset) 0N/A uint idx;
// index (0..31...) which identifies this layout 0N/A const char*
name;
// name of layout 0N/A const char*
layout;
// string of layout (not yet parsed) 0N/A band**
elems;
// array of top-level layout elems (or callables) 0N/A // Locate the five fixed bands. 0N/A // Register a new layout, and make bands for it. 0N/A // Parse a layout string or part of one, recursively if necessary. 0N/A // Read data into the bands of the idx-th layout. 0N/A // Return flag_count if idx is predef and not redef, else zero. 0N/A // Resets to a known sane state 0N/A // Deallocates all storage. 0N/A // Deallocates temporary storage (volatile after next client call). 0N/A // Option management methods 0N/A // Entry points to the unpack engine 0N/A // Public post unpack methods 0N/A // General purpose methods 0N/A // Output management 0N/A // These take an implicit parameter of wp/wplimit, and resize as necessary: 0N/A void putu2(
int n);
// { putu2_at(put_space(2), n); } 0N/A void putu4(
int n);
// { putu4_at(put_space(4), n); } 0N/A void putref(
entry* e);
// { putu2_at(put_space(2), putref_index(e, 2)); } 0N/A // Definitions of standard classfile int formats: