org.jboss.ejb3.protocol.jarjar
Class JarJarInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.jboss.ejb3.protocol.jarjar.JarJarInputStream
All Implemented Interfaces:
Closeable

public class JarJarInputStream
extends InputStream

Provide an input stream in jar format which is build up using a subset of a jar file.

Version:
$Revision: 72001 $
Author:
Carlo de Wolf

Constructor Summary
protected JarJarInputStream(JarFile jarFile, JarEntry rootEntry)
           
 
Method Summary
 void close()
           
protected  void copy(InputStream in, OutputStream out, long size)
           
protected  JarEntry createEntry(JarEntry rootEntry, JarEntry template)
           
protected  boolean isRelativeTo(JarEntry rootEntry, JarEntry current)
           
 int read()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarJarInputStream

protected JarJarInputStream(JarFile jarFile,
                            JarEntry rootEntry)
                     throws IOException
Parameters:
jarFile - the jar file to read from
rootEntry - the root entry at which the new jar file starts
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

copy

protected void copy(InputStream in,
                    OutputStream out,
                    long size)
             throws IOException
Throws:
IOException

createEntry

protected JarEntry createEntry(JarEntry rootEntry,
                               JarEntry template)

isRelativeTo

protected boolean isRelativeTo(JarEntry rootEntry,
                               JarEntry current)

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.