Beispiel #1
0
 @Override
 public void close() {
   try {
     serializer.flush();
   } catch (IOException e) {
     throw new RuntimeException("flush error", e);
   }
   IOUtils.closeQuietly(outputStream);
 }
Beispiel #2
0
  @Override
  public void writeObject(Object object) {
    try {

      if (!isInit) {
        isInit = true;
        init();
      }
      serializer.serialize(object, outputStream);
    } catch (Exception e) {
      throw new RuntimeException("write error,id:" + getId(), e);
    }
  }