private final void getArray(ByteBuffer out) { if (out.hasArray()) { output = out.array(); outEnd = out.arrayOffset() + out.limit(); data[OUTPUT_WRITTEN] = (out.arrayOffset() + out.position()); } else { outEnd = out.remaining(); if (output == null || (outEnd > output.length)) { output = new byte[outEnd]; }    data[OUTPUT_WRITTEN] = 0; }
private final int getArray(ByteBuffer out) { if(out.hasArray()){ output = out.array(); outEnd = out.limit(); return out.position(); }else{ outEnd = out.remaining(); if(output==null || (outEnd > output.length)){ output = new byte[outEnd]; }    return 0; }
	private final void getArray(ByteBuffer out) {		if (out.hasArray()) {			output = out.array();			outEnd = out.arrayOffset() + out.limit();			data[OUTPUT_WRITTEN] = (out.arrayOffset() + out.position());		} else {			outEnd = out.remaining();			if (output == null || (outEnd > output.length)) {				output = new byte[outEnd];			}			//since the new 			// buffer start position 			// is 0			data[OUTPUT_WRITTEN] = 0;		}	}