code: public VideoData duplicate() throws IOException, ClassNotFoundException {
          VideoData result = new VideoData();
          // serialize
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          ObjectOutputStream oos = new ObjectOutputStream(baos);
          writeExternal(oos);
          oos.close();
          // convert to byte array
          byte[] buf = baos.toByteArray();
          baos.close();
          // create input streams
          ByteArrayInputStream bais = new ByteArrayInputStream(buf);
          ObjectInputStream ois = new ObjectInputStream(bais);
          // deserialize
          result.readExternal(ois);
          ois.close();
          bais.close();
          // clone the header if there is one
          if (header != null) {
              result.setHeader(header.clone());
          }
          result.setSourceType(sourceType);
          result.setSource(source);
          result.setTimestamp(timestamp);
          return result;
      }
docs: Duplicate this message / event.
  
  @return duplicated event