code: public static byte[] serialize(Serializable s) throws IOException {
  
          HsqlByteArrayOutputStream bo = new HsqlByteArrayOutputStream();
          ObjectOutputStream        os = new ObjectOutputStream(bo);
  
          os.writeObject(s);
  
          return bo.toByteArray();
      }
docs: Retrieves the serialized form of the specified <CODE>Object</CODE>
  as an array of bytes.
  
  @param s the Object to serialize
  @return  a static byte array representing the passed Object