Converts a function which creates an InputStream into a ManagedResource[BufferedInputStream].
Converts a function which creates an OutputStream into a ManagedResource[BufferedOutputStream].
Creates a managed resource which works against something constructed out of a file.
Creates a managed resource which works against something constructed out of a file.
Note: This ensures that the directory in which the file lives is created prior to opening the resource, which is why it has a bit of an odd signature.
Creates a new FileChannel given an input file.
Creates a new FileChannel given an input file. Note: This will ensure the parent directory for the file exists before opening.
Creates a new BufferedInputStream for a given file.
Constructs a Traversable which will open and read a file's lines every time it is traversed.
Creates a new FileOutputChannel given a file.
Creates a new FileOutputChannel given a file. Note: This will ensure the parent directory for the file exists before opening the file.
Creates a new BufferedInputStream for a given file.
Constructs a file reader for a file.
Constructs a file reader for a file. Defaults to UTF-8 encoding if no other encoding is specified.
Constructs a file writer for a file.
Constructs a file writer for a file. Defaults to UTF-8 encoding if no other encoding is specified.
Constructs a new managed GzipInputStream from a normal IntputStream.
Constructs a new managed GzipInputStream from a normal IntputStream. Note: Default buffer size is 8192.
Constructs a new outpustream which ensures the GZIP is "finished" after completing our operation.
Constructs a new outpustream which ensures the GZIP is "finished" after completing our operation. Note: Default buffer size is 8192.
Constructs a new JarFile reader.
Creates a resource which converts an InputStream into a JarInputStream and ensures it is closed.
Creates a resource which converts an OutputStream into a JarOutputStream and ensures it is closed.
Creates a new managed Reader which reads from an input stream using the given charset.
Creates a new input stream from a java.
Creates a new input stream from a java.net.URL.
Constructs a new buffered reader for a URL.
Creates a resource which opens/closes for a particular entry in a zip file.
Constructs a new ZipFile reader.
Constructs a new managed ZipInputStream from a normal InputStream.
Constructs a new managed ZipOutputStream from a normal OutputStream.
Convenience methods for common java IO operations.
This API attempts to do two things:
1. Clean up common java IO operations and conversions, e.g. always returning "Buffered" streams rather than raw ones. 2. Avoid frustrating errors when dealing with the filesystem, e.g. trying to write to a file whose parent directories do not exist yet.
Note: This code is ported from the sbt IO library.