public void decode(NetworkDataRepresentation ndr, NdrBuffer src) { src.align(4); authenticationService = src.dec_ndr_small(); protectionLevel = src.dec_ndr_small(); src.dec_ndr_small(); // padding count contextId = src.dec_ndr_long(); System.arraycopy(src.getBuffer(), src.getIndex(), body, 0, body.length); src.index += body.length; }
public void encode(NetworkDataRepresentation ndr, NdrBuffer dst) { int padding = dst.align(4, (byte) 0); dst.enc_ndr_small(authenticationService); dst.enc_ndr_small(protectionLevel); dst.enc_ndr_small(padding); dst.enc_ndr_small(0); // Reserved dst.enc_ndr_long(contextId); System.arraycopy(body, 0, dst.getBuffer(), dst.getIndex(), body.length); // dst.index += body.length; dst.advance(body.length); }