类 Toolkit.IO
- java.lang.Object
-
- cn.mcres.karlatemp.mxlib.tools.Toolkit.IO
-
-
构造器概要
构造器 构造器 说明 IO()
-
方法概要
修饰符和类型 方法 说明 static void
insertData(long position, ByteBuffer data, RandomAccessFile access)
Insert data to filestatic void
insertData(long position, ByteBuffer data, RandomAccessFile access, boolean raw)
Insert data to filestatic void
insertEmpty(long position, int size, 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 long
writeTo(InputStream is, OutputStream os)
static long
writeTo(InputStream is, OutputStream os, byte[] buffer)
static long
writeTo(InputStream is, OutputStream os, byte[] buffer, long length)
-
-
-
方法详细资料
-
writeTo
public static long writeTo(@NotNull InputStream is, @NotNull OutputStream os) throws IOException
- 抛出:
IOException
-
writeTo
public static long writeTo(@NotNull InputStream is, @NotNull OutputStream os, @Nullable byte[] buffer) throws IOException
- 抛出:
IOException
-
writeTo
public static long writeTo(@NotNull InputStream is, @NotNull OutputStream os, @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 RandomAccessFile access) throws IOException
Insert 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 RandomAccessFile access, boolean raw) throws IOException
Insert 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 RandomAccessFile access) throws IOException
Insert empty data to position- 参数:
position
- The insert positionsize
- The empty sizeaccess
- The random access file.(writable and readable)- 抛出:
IOException
- The runtime exception.- 从以下版本开始:
- 2.7
-
-