Class Streams
- java.lang.Object
-
- org.codehaus.plexus.archiver.util.Streams
-
public class Streams extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static InputStream
EMPTY_INPUTSTREAM
-
Constructor Summary
Constructors Constructor Description Streams()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedInputStream
bufferedInputStream(InputStream is)
static BufferedOutputStream
bufferedOutputStream(OutputStream os)
static byte[]
cacheBuffer()
static void
copyFully(InputStream zIn, OutputStream out, String gzip)
static void
copyFullyDontCloseOutput(InputStream zIn, OutputStream out, String gzip)
static InputStream
fileInputStream(File file)
static InputStream
fileInputStream(File file, String operation)
static OutputStream
fileOutputStream(File file)
static OutputStream
fileOutputStream(File file, String operation)
-
-
-
Field Detail
-
EMPTY_INPUTSTREAM
public static final InputStream EMPTY_INPUTSTREAM
-
-
Method Detail
-
bufferedInputStream
public static BufferedInputStream bufferedInputStream(InputStream is)
-
bufferedOutputStream
public static BufferedOutputStream bufferedOutputStream(OutputStream os)
-
cacheBuffer
public static byte[] cacheBuffer()
-
fileInputStream
public static InputStream fileInputStream(File file) throws IOException
- Throws:
IOException
-
fileInputStream
public static InputStream fileInputStream(File file, String operation) throws ArchiverException
- Throws:
ArchiverException
-
fileOutputStream
public static OutputStream fileOutputStream(File file) throws IOException
- Throws:
IOException
-
fileOutputStream
public static OutputStream fileOutputStream(File file, String operation) throws ArchiverException
- Throws:
ArchiverException
-
copyFully
public static void copyFully(@WillClose InputStream zIn, @WillClose OutputStream out, String gzip) throws ArchiverException
- Throws:
ArchiverException
-
copyFullyDontCloseOutput
public static void copyFullyDontCloseOutput(@WillClose InputStream zIn, @WillNotClose OutputStream out, String gzip) throws ArchiverException
- Throws:
ArchiverException
-
-