Examples of writeObject()


Examples of org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.writeObject()

          try
          {
            // trigger serialization again, but this time gather some more info
            CheckingObjectOutputStream checkingObjectOutputStream =
              new CheckingObjectOutputStream(outputStream, new ObjectSerializationChecker(nsx));
            checkingObjectOutputStream.writeObject(obj);
          }
          catch (Exception x)
          {
            if (x instanceof CheckingObjectOutputStream.ObjectCheckException)
            {
View Full Code Here

Examples of org.apache.wicket.util.io.SerializableChecker.writeObject()

   * @throws Exception
   */
  public void testSerializable() throws Exception
  {
    SerializableChecker checker = new SerializableChecker(new NotSerializableException());
    checker.writeObject(new ValueMap());
  }
}
View Full Code Here

Examples of org.apache.wink.json4j.internal.Serializer.writeObject()

        } else {
            serializer = new Serializer(writer);
        }

        try {
            serializer.writeObject(this);
        } catch (IOException iox) {
            JSONException jex = new JSONException("Error occurred during input read.");
            jex.initCause(iox);
            throw jex;
        }
View Full Code Here

Examples of org.archive.bdb.AutoKryo.writeObject()

        InetAddress localhost = InetAddress.getLocalHost();
        CrawlHost crawlHost0 = new CrawlHost(localhost.getHostName());
        crawlHost0.setIP(localhost, 431243);

        ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
        kryo.writeObject(buffer, crawlHost0);
        buffer.flip();
       
        CrawlHost crawlHost1 = kryo.readObject(buffer, CrawlHost.class);

        TestCase.assertEquals(crawlHost0.getClass(), crawlHost1.getClass());
View Full Code Here

Examples of org.bouncycastle.asn1.ASN1OutputStream.writeObject()

                try {
                    ASN1EncodableVector attribute = new ASN1EncodableVector();
                    for (int k = 0; k < sseq.size(); ++k) {
                        attribute.add(sseq.getObjectAt(k));
                    }
                    dout.writeObject(new DERSet(attribute));
                    dout.close();
                }
                catch (IOException ioe){}
                sigAttr = bOut.toByteArray();
View Full Code Here

Examples of org.bouncycastle.asn1.BEROutputStream.writeObject()

        AuthenticatedSafe   auth = new AuthenticatedSafe(info);

        ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
        BEROutputStream         berOut = new BEROutputStream(bOut);

        berOut.writeObject(auth);

        byte[]              pkg = bOut.toByteArray();

        ContentInfo         mainInfo = new ContentInfo(data, new BERConstructedOctetString(pkg));
View Full Code Here

Examples of org.bouncycastle.asn1.DEROutputStream.writeObject()

    CertificateFactory certFactory= CertificateFactory.getInstance( "X.509", "BC" );
    while ( enumx.hasMoreElements() ) {
        outStream = new ByteArrayOutputStream();
        derOutStream = new DEROutputStream(outStream);
   
              derOutStream.writeObject(enumx.nextElement());
              derOutStream.close();

        certInStream = new ByteArrayInputStream(outStream.toByteArray());
        certificates.add(0,certFactory.generateCertificate(certInStream));
    }
View Full Code Here

Examples of org.bouncycastle.bcpg.BCPGOutputStream.writeObject()

        try
        {
            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
            BCPGOutputStream        pOut = new BCPGOutputStream(bOut);
           
            pOut.writeObject(secKey);
           
            byte[]    keyData = bOut.toByteArray();

            pOut.write(checksum(useSHA1, keyData, keyData.length));
           
View Full Code Here

Examples of org.bouncycastle.openssl.PEMWriter.writeObject()

    try {
      StringWriter stringWriter = new StringWriter();

      PEMWriter writer = new PEMWriter(stringWriter, BouncyCastleLoader.getName());
      for (X509Certificate cert : certs) {
        writer.writeObject(cert);
      }
      writer.close();

      String s = stringWriter.toString();
      return s;
View Full Code Here

Examples of org.bouncycastle.openssl.jcajce.JcaPEMWriter.writeObject()

      FileOutputStream keyOut = new FileOutputStream(keyFile);
     
      // Write the certificate in OpenSSL PEM format (important for the server)
      StringWriter strWriter = new StringWriter();
      JcaPEMWriter pemWriter = new JcaPEMWriter(strWriter);
      pemWriter.writeObject(cert);
      pemWriter.close();
     
      // Line endings MUST be UNIX for the PC to accept the cert properly
      OutputStreamWriter certWriter = new OutputStreamWriter(certOut);
      String pemStr = strWriter.getBuffer().toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.