Package java.io

Examples of java.io.DataInputStream.readLong()


        if (emitProperties) {
            properties.put("file_type", "PNG v. 1.0");
        }

        try {
            long magic = distream.readLong();
            if (magic != 0x89504e470d0a1a0aL) {
                String msg = PropertyUtil.getString("PNGImageDecoder0");
                throw new RuntimeException(msg);
            }
        } catch (Exception e) {
View Full Code Here


        if (emitProperties) {
            properties.put("file_type", "PNG v. 1.0");
        }

        try {
            long magic = distream.readLong();
            if (magic != PNG_SIGNATURE) {
                String msg = PropertyUtil.getString("PNGImageDecoder0");
                throw new RuntimeException(msg);
            }
        } catch (IOException ioe) {
View Full Code Here

          flag = in.readByte();
          if (flag == MAJOR_COMPACTION) {
            this.majorCompaction = in.readBoolean();
          }
        }
        return in.readLong();
      }
      throw new IOException("Cannot process log file: " + p);
    } finally {
      in.close();
    }
View Full Code Here

    private static Pair<ReplayPosition, Long> truncationRecordFromBlob(ByteBuffer bytes)
    {
        try
        {
            DataInputStream in = new DataInputStream(ByteBufferUtil.inputStream(bytes));
            return Pair.create(ReplayPosition.serializer.deserialize(in), in.available() > 0 ? in.readLong() : Long.MIN_VALUE);
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(barr);
    DataInputStream inputStream = new DataInputStream(bais);

    try {
      long msb = inputStream.readLong();
      long lsb = inputStream.readLong();
      return new UUID(msb, lsb);

    } catch (IOException e) {
      throw new RuntimeException("Not Expecting this", e);
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(barr);
    DataInputStream inputStream = new DataInputStream(bais);

    try {
      long msb = inputStream.readLong();
      long lsb = inputStream.readLong();
      return new UUID(msb, lsb);

    } catch (IOException e) {
      throw new RuntimeException("Not Expecting this", e);
    }
View Full Code Here

                        args[i]=Util.objectFromStream(in);
                }
                return new MethodCall(id, args);
            }
            else if(type == VALUE) {
                long expiration_time=in.readLong();
                Object obj=Util.objectFromStream(in);
                return new Cache.Value(obj, expiration_time);
            }
            else
                return Util.objectFromStream(in);
View Full Code Here

    m_leafCapacity = ds.readInt();
    m_nearMinimumOverlapFactor = ds.readInt();
    m_splitDistributionFactor = ds.readDouble();
    m_reinsertFactor = ds.readDouble();
    m_dimension = ds.readInt();
    m_stats.m_nodes = ds.readLong();
    m_stats.m_data = ds.readLong();
    m_stats.m_treeHeight = ds.readInt();

    for (int cLevel = 0; cLevel < m_stats.m_treeHeight; cLevel++)
    {
View Full Code Here

    m_nearMinimumOverlapFactor = ds.readInt();
    m_splitDistributionFactor = ds.readDouble();
    m_reinsertFactor = ds.readDouble();
    m_dimension = ds.readInt();
    m_stats.m_nodes = ds.readLong();
    m_stats.m_data = ds.readLong();
    m_stats.m_treeHeight = ds.readInt();

    for (int cLevel = 0; cLevel < m_stats.m_treeHeight; cLevel++)
    {
      m_stats.m_nodesInLevel.add(new Integer(ds.readInt()));
View Full Code Here

      HornetQBufferInputStream is = new HornetQBufferInputStream(buffer);
      DataInputStream dataInput = new DataInputStream(is);

      for (int i = 1; i <= 15; i++)
      {
         Assert.assertEquals(i, dataInput.readLong());
      }

      assertEquals(-1, dataInput.read());
   }
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.