- java.lang.Object
-
- cn.mcres.karlatemp.mxlib.tools.Toolkit.IO
-
-
构造器概要
构造器 构造器 说明 IO()
-
方法概要
修饰符和类型 方法 说明 static byte[]digest(@NotNull MessageDigest md, @NotNull File file)Quick calculation of file/directorystatic byte[]digest(@NotNull MessageDigest md, @NotNull Supplier<? extends InputStream> data, @org.jetbrains.annotations.Nullable byte[] buffer)Quick calculation of input streams.static voidinsertData(long position, ByteBuffer data, @NotNull RandomAccessFile access)Insert data to filestatic voidinsertData(long position, ByteBuffer data, @NotNull RandomAccessFile access, boolean raw)Insert data to filestatic voidinsertEmpty(long position, int size, @NotNull RandomAccessFile access)Insert empty data to positionstatic byte[]toBytes(int bits, int bytes)get bytes from bitsstatic byte[]toBytes(long bits, int bytes)get bytes from bitsstatic longwriteTo(@NotNull InputStream is, @NotNull OutputStream os)static longwriteTo(@NotNull InputStream is, @NotNull OutputStream os, @org.jetbrains.annotations.Nullable byte[] buffer)static longwriteTo(@NotNull InputStream is, @NotNull OutputStream os, @org.jetbrains.annotations.Nullable byte[] buffer, long length)
-
-
-
方法详细资料
-
writeTo
public static long writeTo(@NotNull @NotNull InputStream is, @NotNull @NotNull OutputStream os) throws IOException- 抛出:
IOException
-
writeTo
public static long writeTo(@NotNull @NotNull InputStream is, @NotNull @NotNull OutputStream os, @Nullable @org.jetbrains.annotations.Nullable byte[] buffer) throws IOException- 抛出:
IOException
-
writeTo
public static long writeTo(@NotNull @NotNull InputStream is, @NotNull @NotNull OutputStream os, @Nullable @org.jetbrains.annotations.Nullable byte[] buffer, long length) throws IOException- 抛出:
IOException
-
toBytes
public static byte[] toBytes(int bits, int bytes)get bytes from bits- 参数:
bits- Bits of cutbytes- byte array size- 返回:
- The array of bits
- 从以下版本开始:
- 2.7
- 另请参阅:
toBytes(long, int)
-
toBytes
public static byte[] toBytes(long bits, int bytes)get bytes from bits- 参数:
bits- Bits of cutbytes- byte array size- 返回:
- The array of bits
- 从以下版本开始:
- 2.7
-
insertData
public static void insertData(long position, ByteBuffer data, @NotNull @NotNull RandomAccessFile access) throws IOExceptionInsert data to file- 参数:
position- The insert positiondata- The data insertaccess- The random access file.(writable and readable)- 抛出:
IOException- The runtime exception.- 从以下版本开始:
- 2.7
-
insertData
public static void insertData(long position, ByteBuffer data, @NotNull @NotNull RandomAccessFile access, boolean raw) throws IOExceptionInsert data to file- 参数:
position- The insert positiondata- The data insertaccess- The random access file.(writable and readable)raw- Set write all data.(Unsafe)- 抛出:
IOException- The runtime exception.- 从以下版本开始:
- 2.7
-
insertEmpty
public static void insertEmpty(long position, int size, @NotNull @NotNull RandomAccessFile access) throws IOExceptionInsert empty data to position- 参数:
position- The insert positionsize- The empty sizeaccess- The random access file.(writable and readable)- 抛出:
IOException- The runtime exception.- 从以下版本开始:
- 2.7
-
digest
public static byte[] digest(@NotNull @NotNull MessageDigest md, @NotNull @NotNull File file) throws IOExceptionQuick calculation of file/directory- 参数:
md- The meddage digestfile- The file or dir- 返回:
- the digest
- 抛出:
IOException- Throw when make any exception.- 从以下版本开始:
- 2.11
-
digest
public static byte[] digest(@NotNull @NotNull MessageDigest md, @NotNull @NotNull Supplier<? extends InputStream> data, @Nullable @org.jetbrains.annotations.Nullable byte[] buffer) throws IOExceptionQuick calculation of input streams.- 参数:
md- The message digest using.data- Streams.buffer- reading buffer.- 返回:
- Result
- 抛出:
IOException- Stream Reading Error.
-
-