Examples of writeObject()


Examples of org.apache.pivot.serialization.PropertiesSerializer.writeObject()

    protected byte[] mapToPropertiesToBytes(Map<String, Object> testMap2)
            throws IOException, SerializationException {
        Serializer<Map<?, ?>> serializer = new PropertiesSerializer();

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        serializer.writeObject(testMap2, outputStream);
        outputStream.flush();
        outputStream.close();

        String result = outputStream.toString();
View Full Code Here

Examples of org.apache.pivot.serialization.StringSerializer.writeObject()

        log("writeValues()");

        Serializer<String> serializer = new StringSerializer();

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        serializer.writeObject(testString, outputStream);

        outputStream.flush();
        outputStream.close();

        String result = outputStream.toString();
View Full Code Here

Examples of org.apache.pivot.wtk.text.PlainTextSerializer.writeObject()

            String selectedText = null;
            try {
                PlainTextSerializer serializer = new PlainTextSerializer();
                StringWriter writer = new StringWriter();
                serializer.writeObject(selection, writer);
                selectedText = writer.toString();
            } catch(IOException exception) {
                throw new RuntimeException(exception);
            }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.writeObject()

    }

    public void testWriteObject() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeObject(new Boolean(true));
        bm.writeObject(new Boolean(false));
        bm.writeObject(new Byte((byte)2));
        bm.writeObject(new byte[]{1,2,3,4});
        bm.writeObject(new Character('g'));
        bm.writeObject(new Short((short) 29));
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.writeObject()

    }

    public void testWriteObject() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeObject(new Boolean(true));
        bm.writeObject(new Boolean(false));
        bm.writeObject(new Byte((byte)2));
        bm.writeObject(new byte[]{1,2,3,4});
        bm.writeObject(new Character('g'));
        bm.writeObject(new Short((short) 29));
View Full Code Here

Examples of org.apache.qpid.proton.codec.EncoderImpl.writeObject()

        AMQPDefinedTypes.registerAllTypes(decoder);
        encoder.setByteBuffer(buffer);

        if(getHeader() != null)
        {
            encoder.writeObject(getHeader());
        }
        if(getDeliveryAnnotations() != null)
        {
            encoder.writeObject(getDeliveryAnnotations());
        }
View Full Code Here

Examples of org.apache.qpid.typedmessage.TypedBytesContentWriter.writeObject()

        {
            writer.writeNullTerminatedStringImpl(entry.getKey());

            try
            {
                writer.writeObject(entry.getValue());
            }
            catch (TypedBytesFormatException e)
            {
                throw new MessageFormatException(e.getMessage());
            }
View Full Code Here

Examples of org.apache.tapestry.internal.util.Base64ObjectOutputStream.writeObject()

            os.writeInt(_persistedValues.size());

            for (Map.Entry<Key, Object> e : _persistedValues.entrySet())
            {
                os.writeObject(e.getKey());
                os.writeObject(e.getValue());
            }

        }
        catch (Exception ex)
View Full Code Here

Examples of org.apache.tapestry5.internal.util.Base64ObjectOutputStream.writeObject()

            os.writeInt(persistedValues.size());

            for (Map.Entry<Key, Object> e : persistedValues.entrySet())
            {
                os.writeObject(e.getKey());
                os.writeObject(e.getValue());
            }

        }
        catch (Exception ex)
View Full Code Here

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

   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }

  /**
   * Asserts that {@link org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream}
   * will check an instance just once, despite it occurs more than once in the object tree
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.