Package java.io

Examples of java.io.ObjectInputStream.readByte()


            in.read( data );
            Entry entry = ( Entry ) entrySerializer.deserialize( data );
            entry.setDn( entryDn );

            // Read the changeType
            byte type = in.readByte();
            ChangeType changeType = ChangeType.getChangeType( type );

            if ( changeType == ChangeType.MODDN )
            {
                type = in.readByte();
View Full Code Here


            byte type = in.readByte();
            ChangeType changeType = ChangeType.getChangeType( type );

            if ( changeType == ChangeType.MODDN )
            {
                type = in.readByte();
                SyncModifyDnType modDnType = SyncModifyDnType.getModifyDnType( type );
                SyncModifyDn modDnControl = new SyncModifyDnDecorator( codec );
               
                modDnControl.setModDnType( modDnType );
               
View Full Code Here

                     cm200.objectToObjectStream(rrv, outStream);
                     outStream.close();
                     out.close();
                     // test that the output stream has got "/hello" as it's region Fqn.
                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_FQN : "The stream should start with an Fqn";
                     // discard the nest refId short
                     in.readShort();
                     Fqn f = cm200.unmarshallFqn(in, new UnmarshalledReferences());
                     assert region.equals(f) : "Should use the same region for the response as was used for the request!";
View Full Code Here

                     cm200.objectToObjectStream(true, outStream);
                     outStream.close();
                     out.close();
                     // test that the output stream has got "/hello" as it's region Fqn.
                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     byte magic = in.readByte();

                     assert magic != CacheMarshaller200.MAGICNUMBER_FQN : "The stream should NOT start with an Fqn!";
                     assert magic == CacheMarshaller200.MAGICNUMBER_NULL : "Should start with a NULL.  Instead, was " + magic;
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_BOOLEAN : "Should have a boolean magic number before the boolean value";
                     assert in.readBoolean() : "The boolean written to the stream should be true";
View Full Code Here

                     ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
                     byte magic = in.readByte();

                     assert magic != CacheMarshaller200.MAGICNUMBER_FQN : "The stream should NOT start with an Fqn!";
                     assert magic == CacheMarshaller200.MAGICNUMBER_NULL : "Should start with a NULL.  Instead, was " + magic;
                     assert in.readByte() == CacheMarshaller200.MAGICNUMBER_BOOLEAN : "Should have a boolean magic number before the boolean value";
                     assert in.readBoolean() : "The boolean written to the stream should be true";

                  }
                  catch (Throwable t)
                  {
View Full Code Here

        try
        {
            Entry entry = new DefaultEntry( schemaManager );

            // Read the Dn, if any
            byte hasDn = in.readByte();

            if ( hasDn == 1 )
            {
                Rdn rdn = new Rdn( schemaManager );
                rdn.readExternal( in );
View Full Code Here

        try
        {
            Entry entry = new DefaultEntry( schemaManager );

            // Read the Dn, if any
            byte hasDn = in.readByte();

            if ( hasDn == 1 )
            {
                Rdn rdn = new Rdn( schemaManager );
                rdn.readExternal( in );
View Full Code Here

        try
        {
            ParentIdAndRdn parentIdAndRdn = new ParentIdAndRdn();

            // Read the number of rdns, if any
            byte nbRdns = in.readByte();

            if ( nbRdns == 0 )
            {
                parentIdAndRdn.setRdns( new Rdn[0] );
            }
View Full Code Here

        try {
            RecordLocation loc = (RecordLocation)marks.get(id);
            Packet packet = journal.read(loc);
            ObjectInputStream ois = new ObjectInputStream(
                    new ByteArrayInputStream(packet.sliceAsBytes()));
            ois.readByte();
            ois.readUTF();
            ois.skipBytes(UUID_LENGTH);
            Object obj = ois.readObject();
            return obj;
        }
View Full Code Here

                        }
                        markLock.notify();
                    }
                    else {
                        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buffer));
                        ois.readByte();
                        String queue = ois.readUTF();
                        byte[] buf = new byte[UUID_LENGTH];
                        ois.read(buf);
                        UUID id = new UUID(buf);
                        results.put(id, new HolderImpl(queue, id));
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.