Java将字节写入OutputStream
示例
一次将字节写入OutputStream一个字节
OutputStream stream = object.getOutputStream(); byte b = 0x00; stream.write( b );
写一个字节数组
byte[] bytes = new byte[] { 0x00, 0x00 };
stream.write( bytes );编写字节数组的一部分
int offset = 1;
int length = 2;
byte[] bytes = new byte[] { 0xFF, 0x00, 0x00, 0xFF };
stream.write( bytes, offset, length );
热门推荐
10 女儿生日简短祝福语幽默
11 元旦祝福语的英文简短
12 中秋送礼的祝福语简短
13 爸妈简短婚礼祝福语大全
14 天仓节祝福语简短
15 虎年孩子说简短祝福语
16 结婚新娘妈妈祝福语简短
17 对战友的祝福语简短
18 音乐生祝福语大全简短