This commit is contained in:
@@ -11,7 +11,9 @@ import java.nio.charset.*;
|
|||||||
/**
|
/**
|
||||||
* 简单的byte[]操作类。
|
* 简单的byte[]操作类。
|
||||||
*
|
*
|
||||||
* <p> 详情见: http://www.redkale.org
|
* <p>
|
||||||
|
* 详情见: http://www.redkale.org
|
||||||
|
*
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
*/
|
*/
|
||||||
public final class ByteArray {
|
public final class ByteArray {
|
||||||
@@ -52,6 +54,10 @@ public final class ByteArray {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public byte get(int index) {
|
||||||
|
return content[index];
|
||||||
|
}
|
||||||
|
|
||||||
public void write(byte[] buf) {
|
public void write(byte[] buf) {
|
||||||
System.arraycopy(this.content, 0, buf, 0, count);
|
System.arraycopy(this.content, 0, buf, 0, count);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user