Package java.io

Examples of java.io.ObjectOutputStream.writeByte()


        buffer = new byte[size];
        oiStream.readFully(buffer);
        transferred += size;

        ooStream.writeByte(0);
        ooStream.flush();
        oStream.flush();
      }
    } catch (UnknownHostException uhe) {
      System.out.println("Don't know about host: " + SERVER_HOSTNAME);
View Full Code Here


            ByteArrayOutputStream bs = new ByteArrayOutputStream();
            ObjectOutputStream os = new ObjectOutputStream(bs);
            os.writeObject(object);
            // Ensure last byte is not NUL. Avoids truncation of values when
            // stored in Sybase ASE databases.
            os.writeByte((byte) '.');
            os.flush();
            byte[] buffer = bs.toByteArray();
            os.close();
            bs.close();
            return buffer;
View Full Code Here

            Dn dn = entry.getDn();

            // Write the Rdn of the Dn
            if ( dn.isEmpty() )
            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( 1 );
                Rdn rdn = dn.getRdn();
View Full Code Here

            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( 1 );
                Rdn rdn = dn.getRdn();
                rdn.writeExternal( out );
            }

            // Then the attributes.
View Full Code Here

            Dn dn = entry.getDn();
           
            // Write the Rdn of the Dn
            if ( dn.isEmpty() )
            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( 1 );
                Rdn rdn = dn.getRdn();
View Full Code Here

            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( 1 );
                Rdn rdn = dn.getRdn();
                rdn.writeExternal( out );
            }
           
            // Then the attributes.
View Full Code Here

            Rdn[] rdns = parentIdAndRdn.getRdns();
           
            // Write the Rdn of the Dn
            if ( ( rdns == null ) || ( rdns.length == 0 ) )
            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( rdns.length );
               
View Full Code Here

            {
                out.writeByte( 0 );
            }
            else
            {
                out.writeByte( rdns.length );
               
                for ( Rdn rdn : rdns )
                {
                    rdn.writeExternal( out );
                }
View Full Code Here

    oos.writeShort((short) 7);
    oos.writeFloat(9.96601f);
    oos.writeLong(-900000000000001l);
    oos.writeShort((short) -1);
    oos.writeDouble(Math.PI);
    oos.writeByte((byte) 'z');
    oos.writeDouble(Double.NaN);
   
    byte[] bytes = new byte[] {-1,2,-3,4,-5};
    oos.writeObject(bytes);
    oos.writeByte(100);
View Full Code Here

    oos.writeByte((byte) 'z');
    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();
   
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.