public <T> T roundTrip(int length, int unsafeLength, T object1) {
roundTripWithStreamFactory(unsafeLength, object1, new StreamFactory() {
public Output createOutput(OutputStream os) {
return new UnsafeMemoryOutput(os);
}
public Output createOutput(OutputStream os, int size) {
return new UnsafeMemoryOutput(os, size);
}
public Output createOutput(int size, int limit) {
return new UnsafeMemoryOutput(size, limit);
}
public Input createInput(InputStream os, int size) {
return new UnsafeMemoryInput(os, size);
}