Examples of LittleEndianDataInputStream


Examples of ca.eandb.util.io.LittleEndianDataInputStream

   * Creates a new <code>BinaryDataReader</code> that reads binary data in
   * little-endian from the provided <code>InputStream</code>.
   * @param in The <code>InputStream</code> to read from.
   */
  public static BinaryDataReader littleEndian(InputStream in) {
    return new BinaryDataReader(new LittleEndianDataInputStream(in));
  }
View Full Code Here

Examples of com.google.common.io.LittleEndianDataInputStream

    @SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
    public InputStreamSliceInput(InputStream inputStream)
    {
        pushbackInputStream = new PushbackInputStream(inputStream);
        countingInputStream = new CountingInputStream(pushbackInputStream);
        dataInputStream = new LittleEndianDataInputStream(countingInputStream);
    }
View Full Code Here

Examples of com.google.common.io.LittleEndianDataInputStream

        DataPoint completeDataPoints[] = new DataPoint[numOfDataPoints];

        // Because Intel CPU is using little endian natively, we
        // need to use LittleEndianDataInputStream instead of normal
        // Java DataInputStream, which is big-endian.
        LittleEndianDataInputStream dis = new LittleEndianDataInputStream(
            dumpStream);
        for (int i = 0; i < numOfDataPoints; i++) {
          double mz = dis.readDouble();
          double intensity = dis.readDouble();
          completeDataPoints[i] = new SimpleDataPoint(mz, intensity);
        }

        boolean centroided = ScanUtils.isCentroided(completeDataPoints);
View Full Code Here

Examples of com.google.common.io.LittleEndianDataInputStream

        final LittleEndianDataOutputStream writer = new LittleEndianDataOutputStream(new FileOutputStream("src/test/resources/test_le.txt"));
        writer.writeInt(value);
        writer.close();

        final LittleEndianDataInputStream reader = new LittleEndianDataInputStream(new DataInputStream(new FileInputStream("src/test/resources/test_le.txt")));
        final int result = reader.readInt();
        reader.close();

        assertEquals(value, result);
    }
View Full Code Here

Examples of com.google.common.io.LittleEndianDataInputStream

    DataInput br = null;
    try
    {
      // open a stream to the file
      BufferedInputStream bis = new BufferedInputStream(source, 8192);
      br = new LittleEndianDataInputStream(bis);
//      br.setByteOrder(ByteOrder.LITTLE_ENDIAN);

      TgaHeader header = new TgaHeader();
      header.Read(br);
View Full Code Here

Examples of com.google.common.io.LittleEndianDataInputStream

      }


  public static ImageSize GetTGASize(String filename) throws IOException
  {
    DataInput br = new LittleEndianDataInputStream(new FileInputStream(new File(filename)));

    TgaHeader header = new TgaHeader();
    header.Read(br);
//    br.close();
    return new ImageSize(header.ImageSpec.Width, header.ImageSpec.Height);
View Full Code Here

Examples of parquet.bytes.LittleEndianDataInputStream

   * @see parquet.column.values.ValuesReader#initFromPage(byte[], int)
   */
  @Override
  public void initFromPage(int valueCount, byte[] in, int offset) throws IOException {
    if (DEBUG) LOG.debug("init from page at offset "+ offset + " for length " + (in.length - offset));
    this.in = new LittleEndianDataInputStream(new ByteArrayInputStream(in, offset, in.length - offset));
  }
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.