### Question:
DataBuffer implements Buffer, Externalizable { public static void enableCompressedSerializationOutput(boolean enable) { System.setProperty(COMPRESSED_SERIAL_OUTPUT_PROPERTY, Boolean.toString(enable)); enableCompressedSerializationOutput = enable; } DataBuffer(); protected  DataBuffer(int bufsize); protected  DataBuffer(byte[] data); static void enableCompressedSerializationOutput(boolean enable); static boolean usingCompressedSerializationOutput(); @Override int getId(); boolean isDirty(); boolean isEmpty(); @Override int length(); @Override void get(int offset, byte[] bytes, int dataOffset, int length); @Override void get(int offset, byte[] bytes); @Override byte[] get(int offset, int length); @Override byte getByte(int offset); @Override int getInt(int offset); @Override short getShort(int offset); @Override long getLong(int offset); @Override int put(int offset, byte[] bytes, int dataOffset, int length); @Override int put(int offset, byte[] bytes); @Override int putByte(int offset, byte b); @Override int putInt(int offset, int v); @Override int putShort(int offset, short v); @Override int putLong(int offset, long v); void clear(); void move(int src, int dest, int length); void copy(int offset, DataBuffer buf, int bufOffset, int length); @Override void writeExternal(ObjectOutput out); @Override void readExternal(ObjectInput in); static final long serialVersionUID; static final String COMPRESSED_SERIAL_OUTPUT_PROPERTY; }### Answer:
@Test public void testCompressedInOut() throws Exception { DataBuffer.enableCompressedSerializationOutput(true); transferData(true); transferData(false); }
@Test public void testUncompressedInOut() throws Exception { DataBuffer.enableCompressedSerializationOutput(false); transferData(true); transferData(false); }