public void writeTo(String zoneID,OutputStream out) throws IOException {
  if (out instanceof DataOutput) {
    writeTo(zoneID,(DataOutput)out);
  }
 else {
    writeTo(zoneID,(DataOutput)new DataOutputStream(out));
  }
}

public void writeTo ( String zoneID , OutputStream out ) throws IOException { if ( out instanceof DataOutput ) { writeTo ( zoneID , ( DataOutput ) out ) ; } else { writeTo ( zoneID , ( DataOutput ) new DataOutputStream ( out ) ) ; } }
encodes a built datetimezone to the given stream . call readfrom to decode the data into a datetimezone object .
