Package java.io

Examples of java.io.ObjectOutputStream.writeInt()


           
            // The number of children
            out.writeInt( parentIdAndRdn.getNbChildren() );
           
            // The number of descendants
            out.writeInt( parentIdAndRdn.getNbDescendants() );
           
            out.flush();
           
            if ( IS_DEBUG )
            {
View Full Code Here


            socket = new Socket(host, port);

            ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
           
            oos.writeUTF("getcommand");
            oos.writeInt(1);
            oos.writeObject(command);
           
            oos.flush();
           
            ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
View Full Code Here

        
         oos.writeUTF(command);
        
         if (arguments != null)
         {
            oos.writeInt(arguments.length);
            for (Serializable argument : arguments)
            {
               oos.writeObject(argument);
            }
         }
View Full Code Here

               oos.writeObject(argument);
            }
         }
         else
         {
            oos.writeInt(0);
         }
        
         oos.flush();

         ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
View Full Code Here

        }

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        ObjectOutput out = new ObjectOutputStream( bos );

        out.writeInt( this.store.size() );
        for (Entry<String, byte[]> stringEntry : this.store.entrySet()) {
            Entry entry = (Entry) stringEntry;
            out.writeObject(entry.getKey());
            out.writeObject(entry.getValue());
        }
View Full Code Here

    ByteArrayOutputStream os = new ByteArrayOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(os);
   
    oos.useProtocolVersion(ObjectStreamConstants.PROTOCOL_VERSION_2);
   
    oos.writeInt(1);
    oos.writeShort((short) 7);
    oos.writeFloat(9.96601f);
    oos.writeLong(-900000000000001l);
    oos.writeShort((short) -1);
    oos.writeDouble(Math.PI);
View Full Code Here

            harness.check(false);
          }

        // if only normal data is written
        // a subsequent call to useProtocolVersion must succeed also
        out.writeInt(4);

        try
          {
            out.useProtocolVersion(ObjectStreamConstants.PROTOCOL_VERSION_1);
            harness.check(true);
View Full Code Here

         File contentFile = new File(storageDir, "CacheLocks" + DBBackup.CONTENT_FILE_SUFFIX);
         out = new ObjectOutputStream(new BufferedOutputStream(PrivilegedFileHelper.fileOutputStream(contentFile)));
        
         List<LockData> locks = getLockList();

         out.writeInt(locks.size());
         for (LockData lockData : locks)
         {
            lockData.writeExternal(out);
         }
      }
View Full Code Here

                     EqualityKeySorter.instance );

        // write the assert map of Equality keys
        for ( EqualityKey key : keys ) {
            stream.writeShort( PersisterEnums.EQUALITY_KEY );
            stream.writeInt( key.getStatus() );
            InternalFactHandle handle = key.getFactHandle();
            stream.writeInt( handle.getId() );
//            context.out.println( "EqualityKey int:" + key.getStatus() + " int:" + handle.getId() );
            if ( key.getOtherFactHandle() != null && !key.getOtherFactHandle().isEmpty() ) {
                for ( InternalFactHandle handle2 : key.getOtherFactHandle() ) {
View Full Code Here

        // write the assert map of Equality keys
        for ( EqualityKey key : keys ) {
            stream.writeShort( PersisterEnums.EQUALITY_KEY );
            stream.writeInt( key.getStatus() );
            InternalFactHandle handle = key.getFactHandle();
            stream.writeInt( handle.getId() );
//            context.out.println( "EqualityKey int:" + key.getStatus() + " int:" + handle.getId() );
            if ( key.getOtherFactHandle() != null && !key.getOtherFactHandle().isEmpty() ) {
                for ( InternalFactHandle handle2 : key.getOtherFactHandle() ) {
                    stream.writeShort( PersisterEnums.FACT_HANDLE );
                    stream.writeInt( handle2.getId() );
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.