27,374
社区成员
发帖
与我相关
我的任务
分享
public int write(byte[] buf, int wlength)
{
int i1 = 0;
byte[] arrayOfByte = new byte[4096];
if (this.K == null)
{
arrayOfByte = null;
return -1;
}
if ((FlowControl.XONXOFF == this.as) && (!this.at)) {
return 0;
}
while (i1 < wlength)
{
int i3 = 4096;
if (i1 + i3 > wlength) {
i3 = wlength - i1;
}
System.arraycopy(buf, i1, arrayOfByte, 0, i3);
int i2 = this.K.bulkTransfer(this.N, arrayOfByte, i3, this.U);
if (i2 < 0) {
return -1;
}
i1 += i2;
}
return i1;
}