Java File Read via ByteBuffer readLTriad(byte[] triad)

Here you can find the source of readLTriad(byte[] triad)

Description

read L Triad

License

Open Source License

Declaration

public static int readLTriad(byte[] triad) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

public class Main {
    public static int readLTriad(ByteBuffer bb) {
        byte[] triad = new byte[3];
        bb.get(triad);//from www  . j a va  2  s  .c o m
        return readLTriad(triad);
    }

    public static int readLTriad(byte[] triad) {
        return triad[0] + (triad[1] << 8) + (triad[2] << 16);
    }
}

Related

  1. readLong(byte[] src, int pointer)
  2. readLong(InputStream input)
  3. readLong(InputStream is)
  4. readLong(InputStream is, ByteOrder bo)
  5. readLong(RandomAccessFile raFile)
  6. readNByte(ReadableByteChannel channel, int n)
  7. readNIOFile(String filePath)
  8. readShort(byte[] bytes, int start)
  9. readShort(DataInput input)