Package java.io

Examples of java.io.ObjectOutputStream.writeChar()


    oos.writeDouble(Double.NaN);
   
    byte[] bytes = new byte[] {-1,2,-3,4,-5};
    oos.writeObject(bytes);
    oos.writeByte(100);
    oos.writeChar('X');
    oos.close();

    streamData = os.toByteArray();
   
    harness.check(streamData.length, 76, "Stream length");
View Full Code Here


    private byte [] marshallThingy(DataObject thingy ) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream stream = new ObjectOutputStream(baos);

        stream.writeChar(thingy.type);
        stream.writeLong(thingy.time);
        if( thingy.intCount != null ) {
            stream.writeInt(thingy.intCount);
        }
        else if( thingy.strCount != null ) {
View Full Code Here

    out2.flush();
    out2.writeInt(0xcafebabe);
    out2.flush();
    out2.writeUTF("Max & Möritz");
    out2.flush();
    out2.writeChar('ɛ');
    out2.flush();
    out2.writeObject(new Serialize());
    out2.close();
    byte[] array = out.toByteArray();
    expectEqual(array, new int[] {
View Full Code Here

    private byte [] marshallThingy(DataObject thingy ) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream stream = new ObjectOutputStream(baos);

        stream.writeChar(thingy.type);
        stream.writeLong(thingy.time);
        if( thingy.intCount != null ) {
            stream.writeInt(thingy.intCount);
        }
        else if( thingy.strCount != null ) {
View Full Code Here

    private byte [] marshallThingy(DataObject thingy ) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream stream = new ObjectOutputStream(baos);

        stream.writeChar(thingy.type);
        stream.writeLong(thingy.time);
        if( thingy.intCount != null ) {
            stream.writeInt(thingy.intCount);
        }
        else if( thingy.strCount != null ) {
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.