public Iterator fragment(int size) { byte[] stub = getStub(); if (stub == null) { return Arrays.asList(new RequestCoPdu[] { this }).iterator(); } //subtracting 8 bytes for authentication header and 16 for the authentication verifier size, someone forgot the //poor guys.. int stubSize = size - (getFlag(PFC_OBJECT_UUID) ? 40 : 24) - 8 - 16 ; if (stub.length <= stubSize) { return Arrays.asList(new RequestCoPdu[] { this }).iterator(); } if (logger.isLoggable(Level.FINEST)) { logger.finest("In fragment of RequestCoPdu, this packet will be fragmented while sending...\n"); } return new FragmentIterator(stubSize); }
public Iterator fragment ( int size ) { byte[] stub = getStub (); if ( stub == null ) { return Arrays.asList ( new RequestCoPdu[] { this } ).iterator (); } //subtracting 8 bytes for authentication header and 16 for the authentication verifier size, someone forgot the //poor guys.. int stubSize = size - ( getFlag ( PFC_OBJECT_UUID ) ? 40 : 24 ) - 8 - 16; if ( stub.length <= stubSize ) { return Arrays.asList ( new RequestCoPdu[] { this } ).iterator (); } if ( logger.isLoggable ( Level.FINEST ) ) { logger.finest ( "In fragment of RequestCoPdu, this packet will be fragmented while sending...\n" ); } return new FragmentIterator ( stubSize ); }
if (request.getFlag(ConnectionOrientedPdu.PFC_MAYBE)) return; ConnectionOrientedPdu reply = receive(); if (reply instanceof ResponseCoPdu) {
if ( request.getFlag ( ConnectionOrientedPdu.PFC_MAYBE ) ) return; ConnectionOrientedPdu reply = receive ();
protected void writeBody(NetworkDataRepresentation ndr) { NdrBuffer dst = ndr.getBuffer(); dst.enc_ndr_long(getAllocationHint()); dst.enc_ndr_short(getContextId()); dst.enc_ndr_short(getOpnum()); if (getFlag(PFC_OBJECT_UUID)) { try { getObject().encode(ndr, ndr.getBuffer()); } catch (NdrException ne) { }; } }
protected void readBody(NetworkDataRepresentation ndr) { UUID object = null; NdrBuffer src = ndr.getBuffer(); setAllocationHint(src.dec_ndr_long()); setContextId(src.dec_ndr_short()); setOpnum(src.dec_ndr_short()); if (getFlag(PFC_OBJECT_UUID)) { object = new UUID(); try { object.decode(ndr, src); } catch (NdrException ne) { } } setObject(object); }
protected void readBody ( NetworkDataRepresentation ndr ) { UUID object = null; NdrBuffer src = ndr.getBuffer (); setAllocationHint ( src.dec_ndr_long () ); setContextId ( src.dec_ndr_short () ); setOpnum ( src.dec_ndr_short () ); if ( getFlag ( PFC_OBJECT_UUID ) ) { object = new UUID (); try { object.decode ( ndr, src ); } catch ( NdrException ne ) { } } setObject ( object ); }
protected void writeBody ( NetworkDataRepresentation ndr ) { NdrBuffer dst = ndr.getBuffer (); dst.enc_ndr_long ( getAllocationHint () ); dst.enc_ndr_short ( getContextId () ); dst.enc_ndr_short ( getOpnum () ); if ( getFlag ( PFC_OBJECT_UUID ) ) { try { getObject ().encode ( ndr, ndr.getBuffer () ); } catch ( NdrException ne ) { } ; } }