Examples of writeObject()


Examples of org.bouncycastle.util.io.pem.PemWriter.writeObject()

    StringWriter stringWriter = new StringWriter();

    try {
      PemWriter writer = new PemWriter(stringWriter);
      PemObjectGenerator pemObject = new PemObject("CERTIFICATE REQUEST", csr.getEncoded());
      writer.writeObject(pemObject);
      writer.close();
    } catch (IOException e) {
      throw new IllegalArgumentException("Error generating PEM", e);
    }
View Full Code Here

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

   
        while (e.hasMoreElements())
        {
            try
            {
                aOut.writeObject(e.nextElement());
   
                pq.add(new PolicyQualifierInfo(bOut.toByteArray()));
            }
            catch (IOException ex)
            {
View Full Code Here

Examples of org.bouncycastle2.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.bouncycastle2.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.bouncycastle2.openssl.PEMWriter.writeObject()

            try
            {
                for (int i = 0; i != certificates.size(); i++)
                {
                    pWrt.writeObject(certificates.get(i));
                }
           
                pWrt.close();
            }
            catch (Exception e)
View Full Code Here

Examples of org.bukkit.util.io.BukkitObjectOutputStream.writeObject()

    }

    private static String toString(Object o) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        BukkitObjectOutputStream oos = new BukkitObjectOutputStream(baos);
        oos.writeObject(o);
        oos.close();
        return new String(baos.toByteArray());
    }
}
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.writeObject()

    }
  }
  public void testWriteObject() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeObject(new Boolean(true));
      msg.writeObject(new Long(300l));
      msg.writeObject(new Float(3.3f));
      msg.writeObject(new Character('q'));
      msg.writeObject(new Byte((byte) 1));
      msg.writeObject(new Short((short) 3));
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeObject()

          g.writeStartObject();
          g.writeFieldName("__cmds");
          g.writeStartArray();
          List<Object> functions = new ArrayList<Object>(context.getFunctions());
          for (Object function : functions) {
            g.writeObject(function);
          }
          g.writeEndArray();
          g.writeEndObject();
          g.close();
        }
View Full Code Here

Examples of org.codehaus.jackson.util.TokenBuffer.writeObject()

    public void testBinaryData() throws Exception
    {
        ObjectMapper mapper = new ObjectMapper();
        TokenBuffer buf = new TokenBuffer(mapper);
        buf.writeObject(new byte[3]);
        JsonNode node = mapper.readTree(buf.asParser());
//        assertTrue(node.isBinary());
        byte[] data = node.getBinaryValue();
        assertNotNull(data);
        assertEquals(3, data.length);
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.Type.writeObject()

        tm.register(type);
       
        Element root = new Element("root");
        JDOMWriter writer = new JDOMWriter(root);
       
        type.writeObject(new EnumBean(), writer, new MessageContext());

        JDOMReader reader = new JDOMReader(root);
        Object value = type.readObject(reader, new MessageContext());
       
        assertTrue(value instanceof EnumBean);
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.