public class StreamUtils extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
StreamUtils.Type |
File format type
|
Modifier and Type | Field | Description |
---|---|---|
static int |
BUFFER_SIZE |
Buffer size used across the benchmark package
|
Constructor | Description |
---|---|
StreamUtils() |
Modifier and Type | Method | Description |
---|---|---|
static InputStream |
inputStream(File file) |
Returns an
InputStream over the requested file. |
static OutputStream |
outputStream(File file) |
Returns an
OutputStream over the requested file, identifying
the appropriate OutputStream instance similar to inputStream(File) . |
public static final int BUFFER_SIZE
public static InputStream inputStream(File file) throws IOException
InputStream
over the requested file. This method
attempts to identify the appropriate InputStream
instance to return
based on the file name (e.g., if it ends with .bz2 or .bzip, return a
'bzip' InputStream
).IOException
public static OutputStream outputStream(File file) throws IOException
OutputStream
over the requested file, identifying
the appropriate OutputStream
instance similar to inputStream(File)
.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.