public Object next() { if (index >= stub.length) throw new NoSuchElementException(); ResponseCoPdu fragment = (ResponseCoPdu) ResponseCoPdu.this.clone(); int allocation = stub.length - index; fragment.setAllocationHint(allocation); if (stubSize < allocation) allocation = stubSize; byte[] fragmentStub = new byte[allocation]; System.arraycopy(stub, index, fragmentStub, 0, allocation); fragment.setStub(fragmentStub); int flags = getFlags() & ~(PFC_FIRST_FRAG | PFC_LAST_FRAG); if (index == 0) flags |= PFC_FIRST_FRAG; index += allocation; if (index >= stub.length) flags |= PFC_LAST_FRAG; fragment.setFlags(flags); return fragment; }
public Object next() { if (index >= stub.length) throw new NoSuchElementException(); ResponseCoPdu fragment = (ResponseCoPdu) ResponseCoPdu.this.clone(); int allocation = stub.length - index; fragment.setAllocationHint(allocation); if (stubSize < allocation) allocation = stubSize; byte[] fragmentStub = new byte[allocation]; System.arraycopy(stub, index, fragmentStub, 0, allocation); fragment.setStub(fragmentStub); int flags = getFlags() & ~(PFC_FIRST_FRAG | PFC_LAST_FRAG); if (index == 0) flags |= PFC_FIRST_FRAG; index += allocation; if (index >= stub.length) flags |= PFC_LAST_FRAG; fragment.setFlags(flags); return fragment; }
public Object next () { if ( index >= stub.length ) throw new NoSuchElementException (); ResponseCoPdu fragment = (ResponseCoPdu)ResponseCoPdu.this.clone (); int allocation = stub.length - index; fragment.setAllocationHint ( allocation ); if ( stubSize < allocation ) allocation = stubSize; byte[] fragmentStub = new byte[allocation]; System.arraycopy ( stub, index, fragmentStub, 0, allocation ); fragment.setStub ( fragmentStub ); int flags = getFlags () & ~ ( PFC_FIRST_FRAG | PFC_LAST_FRAG ); if ( index == 0 ) flags |= PFC_FIRST_FRAG; index += allocation; if ( index >= stub.length ) flags |= PFC_LAST_FRAG; fragment.setFlags ( flags ); return fragment; }
protected void readStub(NetworkDataRepresentation ndr) { ndr.getBuffer().align(8); byte[] stub = null; int length = getFragmentLength() - ndr.getBuffer().getIndex(); if (length > 0) { stub = new byte[length]; ndr.readOctetArray(stub, 0, length); } setStub(stub); }
protected void readStub ( NetworkDataRepresentation ndr ) { ndr.getBuffer ().align ( 8 ); byte[] stub = null; int length = getFragmentLength () - ndr.getBuffer ().getIndex (); if ( length > 0 ) { stub = new byte[length]; ndr.readOctetArray ( stub, 0, length ); } setStub ( stub ); }
protected void readStub(NetworkDataRepresentation ndr) { ndr.getBuffer().align(8); byte[] stub = null; int length = getFragmentLength() - ndr.getBuffer().getIndex(); if (length > 0) { stub = new byte[length]; ndr.readOctetArray(stub, 0, length); } setStub(stub); }
final byte[] responsebytes = new byte[length + 4]; System.arraycopy ( ndr.getBuffer ().getBuffer (), 0, responsebytes, 0, responsebytes.length - 4 ); responseCoPdu.setStub ( responsebytes );
byte[] responsebytes = new byte[length + 4]; System.arraycopy(ndr.getBuffer().getBuffer(), 0, responsebytes, 0, responsebytes.length - 4); responseCoPdu.setStub(responsebytes);
byte[] responsebytes = new byte[length + 4]; System.arraycopy(ndr.getBuffer().getBuffer(), 0, responsebytes, 0, responsebytes.length - 4); responseCoPdu.setStub(responsebytes);