com.mucommander.file.impl.zip.provider
Class StoredOutputStream
java.lang.Object
java.io.OutputStream
com.mucommander.file.impl.zip.provider.ZipEntryOutputStream
com.mucommander.file.impl.zip.provider.StoredOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class StoredOutputStream
- extends ZipEntryOutputStream
StoredOutputStream compresses data using the STORED compression method (i.e. no compression).
--------------------------------------------------------------------------------------------------------------
This class is based off the org.apache.tools.zip package of the Apache Ant project. The Ant
code has been modified under the terms of the Apache License which you can find in the bundled muCommander license
file. It was forked at version 1.7.0 of Ant.
- Author:
- Maxence Bernard
|
Constructor Summary |
StoredOutputStream(java.io.OutputStream out)
Creates a new StoredOutputStream that writes compressed data to the given OutputStream
and automatically updates the supplied CRC32 checksum. |
|
Method Summary |
int |
getTotalIn()
Returns the uncompressed size of the data written so far. |
int |
getTotalOut()
Returns the compressed size of the data written so far. |
void |
write(byte[] b,
int offset,
int length)
|
| Methods inherited from class java.io.OutputStream |
close, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StoredOutputStream
public StoredOutputStream(java.io.OutputStream out)
- Creates a new
StoredOutputStream that writes compressed data to the given OutputStream
and automatically updates the supplied CRC32 checksum.
- Parameters:
out - the OutputStream where the compressed data is sent to
getTotalIn
public int getTotalIn()
- Description copied from class:
ZipEntryOutputStream
- Returns the uncompressed size of the data written so far.
- Specified by:
getTotalIn in class ZipEntryOutputStream
- Returns:
- the uncompressed size of the data written so far
getTotalOut
public int getTotalOut()
- Description copied from class:
ZipEntryOutputStream
- Returns the compressed size of the data written so far.
- Specified by:
getTotalOut in class ZipEntryOutputStream
- Returns:
- the compressed size of the data written so far
write
public void write(byte[] b,
int offset,
int length)
throws java.io.IOException
- Overrides:
write in class java.io.OutputStream
- Throws:
java.io.IOException
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard