UnpackerImpl.java revision 3042
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* Implementation of the Pack provider.
* </pre></blockquote>
* @author John Rose
* @author Kumar Srinivasan
*/
/**
* Register a listener for changes to options.
* @param listener An object to be invoked when a property is changed.
*/
}
/**
* Remove a listener for the PropertyChange event.
* @param listener The PropertyChange listener to be removed.
*/
}
public UnpackerImpl() {}
/**
* Get the set of options for the pack and unpack engines.
* @return A sorted association of option key strings to option values.
*/
return props;
}
// Back-pointer to NativeUnpacker, when active.
return Utils.getVersionString();
}
//Driver routines
// The unpack worker...
/**
* Takes a packed-stream InputStream, and writes to a JarOutputStream. Internally
* the entire buffer must be read, it may be more efficient to read the packed-stream
* to a file and pass the File object, in the alternate method described below.
* <p>
* Closes its input but not its output. (The output can accumulate more elements.)
* @param in an InputStream.
* @param out a JarOutputStream.
* @exception IOException if an error is encountered.
*/
throw new NullPointerException("null input");
}
throw new NullPointerException("null output");
}
? null
: TimeZone.getDefault();
try {
if (verbose > 0)
} else {
}
} finally {
}
}
/**
* Takes an input File containing the pack file, and generates a JarOutputStream.
* <p>
* Does not close its output. (The output can accumulate more elements.)
* @param in a File.
* @param out a JarOutputStream.
* @exception IOException if an error is encountered.
*/
throw new NullPointerException("null input");
}
throw new NullPointerException("null output");
}
// Use the stream-based implementation.
// %%% Reconsider if native unpacker learns to memory-map the file.
}
}
private class DoUnpack {
{
}
// Here's where the bits are read from disk:
final boolean keepModtime
final boolean keepDeflateHint
final int modtime;
final boolean deflateHint;
{
if (!keepModtime) {
} else {
}
deflateHint = (keepDeflateHint) ? false :
}
// Checksum apparatus.
if (verbose > 0) {
}
// Try to get another segment.
if (verbose > 0)
}
}
// Process the output directory or jar output.
// Now write out the files.
boolean deflate;
: deflateHint;
if (file.isClassStub()) {
} else {
// collect data & maybe CRC
}
if (needCRC) {
if (verbose > 0)
}
if (keepModtime) {
// Convert back to milliseconds
} else {
}
out.closeEntry();
if (verbose > 0)
}
assert(classesToWrite.isEmpty());
}
}
}