public class StreamUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StreamUtils.Type
File format type
|
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE
Buffer size used across the benchmark package
|
Constructor and Description |
---|
StreamUtils() |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
inputStream(java.nio.file.Path file)
Returns an
InputStream over the requested file. |
static java.io.OutputStream |
outputStream(java.nio.file.Path file)
Returns an
OutputStream over the requested file, identifying
the appropriate OutputStream instance similar to inputStream(Path) . |
public static final int BUFFER_SIZE
public static java.io.InputStream inputStream(java.nio.file.Path file) throws java.io.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
).java.io.IOException
public static java.io.OutputStream outputStream(java.nio.file.Path file) throws java.io.IOException
OutputStream
over the requested file, identifying
the appropriate OutputStream
instance similar to inputStream(Path)
.java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.