Class IOHelper
java.lang.Object
cool.scx.io.IOHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]compressBytes(byte[] bytes, int offset, int length) static longgetFileSize(Path path) static voidreadInToFile(InputStream in, Path path, long offset, long length) static voidreadInToFile(InputStream in, Path path, OpenOption... options) static inttransferByteBuffer(ByteBuffer source, ByteBuffer dest) static voidwriteFileToOut(Path path, OutputStream out) static voidwriteFileToOut(Path path, OutputStream out, long offset, long length)
-
Constructor Details
-
IOHelper
public IOHelper()
-
-
Method Details
-
getFileSize
-
compressBytes
public static byte[] compressBytes(byte[] bytes, int offset, int length) -
writeFileToOut
- Throws:
IOException
-
writeFileToOut
public static void writeFileToOut(Path path, OutputStream out, long offset, long length) throws IOException - Throws:
IOException
-
readInToFile
public static void readInToFile(InputStream in, Path path, OpenOption... options) throws IOException - Throws:
IOException
-
readInToFile
public static void readInToFile(InputStream in, Path path, long offset, long length) throws IOException - Throws:
IOException
-
transferByteBuffer
-