org.zeroturnaround.zip
Class ByteSource

java.lang.Object
  extended by org.zeroturnaround.zip.ByteSource
All Implemented Interfaces:
ZipEntrySource

public class ByteSource
extends Object
implements ZipEntrySource


Constructor Summary
ByteSource(String path, byte[] bytes)
           
ByteSource(String path, byte[] bytes, long time)
           
 
Method Summary
 ZipEntry getEntry()
           
 InputStream getInputStream()
           
 String getPath()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteSource

public ByteSource(String path,
                  byte[] bytes)

ByteSource

public ByteSource(String path,
                  byte[] bytes,
                  long time)
Method Detail

getPath

public String getPath()
Specified by:
getPath in interface ZipEntrySource
Returns:
path of the given entry (not null).

getEntry

public ZipEntry getEntry()
Specified by:
getEntry in interface ZipEntrySource
Returns:
meta-data of the given entry (not null).

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface ZipEntrySource
Returns:
an input stream of the given entry or null if this entry is a directory.
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 ZeroTurnaround. All Rights Reserved.