1 8 9 package com.sleepycat.bind.serial; 10 11 import com.sleepycat.util.FastOutputStream; 12 13 25 public class SerialBase { 26 27 private int outputBufferSize; 28 29 35 public SerialBase() { 36 outputBufferSize = 0; 37 } 38 39 49 public void setSerialBufferSize(int byteSize) { 50 outputBufferSize = byteSize; 51 } 52 53 60 public int getSerialBufferSize() { 61 return outputBufferSize; 62 } 63 64 84 protected FastOutputStream getSerialOutput(Object object) { 85 int byteSize = getSerialBufferSize(); 86 if (byteSize != 0) { 87 return new FastOutputStream(byteSize); 88 } else { 89 return new FastOutputStream(); 90 } 91 } 92 } 93 | Popular Tags |