public Object next() { if (index >= stub.length) throw new NoSuchElementException(); FaultCoPdu fragment = (FaultCoPdu) FaultCoPdu.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(); FaultCoPdu fragment = (FaultCoPdu) FaultCoPdu.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 (); FaultCoPdu fragment = (FaultCoPdu)FaultCoPdu.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) { NdrBuffer buf = ndr.getBuffer(); buf.align(8); byte[] stub = null; int length = getFragmentLength() - buf.getIndex(); if (length > 0) { stub = new byte[length]; ndr.readOctetArray(stub, 0, length); } setStub(stub); }
protected void readStub(NetworkDataRepresentation ndr) { NdrBuffer buf = ndr.getBuffer(); buf.align(8); byte[] stub = null; int length = getFragmentLength() - buf.getIndex(); if (length > 0) { stub = new byte[length]; ndr.readOctetArray(stub, 0, length); } setStub(stub); }
protected void readStub ( NetworkDataRepresentation ndr ) { NdrBuffer buf = ndr.getBuffer (); buf.align ( 8 ); byte[] stub = null; int length = getFragmentLength () - buf.getIndex (); if ( length > 0 ) { stub = new byte[length]; ndr.readOctetArray ( stub, 0, length ); } setStub ( stub ); }