Package java.io

Examples of java.io.ObjectInputStream.readFully()


      List<T> list = new ArrayList<T>( listSize );

      for( int i = 0; i < listSize; i++ )
        {
        byte[] itemBytes = new byte[ in.readInt() ];
        in.readFully( itemBytes );
        list.add( deserialize( itemBytes, tClass, false ) );
        }

      return list;
      }
View Full Code Here


                ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(path)));
                while (in.available() > 0)
                {
                    int size = in.readInt();
                    byte[] bytes = new byte[size];
                    in.readFully(bytes);
                    keys.add(StorageService.getPartitioner().decorateKey(ByteBuffer.wrap(bytes)));
                }
                in.close();
                if (logger.isDebugEnabled())
                    logger.debug(String.format("completed reading (%d ms; %d keys) from saved cache at %s",
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.