Class IOUtils
java.lang.Object
cool.scx.common.util.IOUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidreadInToFile(InputStream in, Path path, long offset, long length) static voidreadInToFile(InputStream in, Path path, OpenOption... options) static inttransferByteBuffer(ByteBuffer source, ByteBuffer dest) static byte[]trimBytes(byte[] bytes, int offset, int length) static voidwriteFileToOut(Path path, OutputStream out) static voidwriteFileToOut(Path path, OutputStream out, long offset, long length)
-
Constructor Details
-
IOUtils
public IOUtils()
-
-
Method Details
-
trimBytes
public static byte[] trimBytes(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
-