Java File Read via ByteBuffer readCode(byte[] message)

Here you can find the source of readCode(byte[] message)

Description

read Code

License

Open Source License

Declaration

public static int readCode(byte[] message) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    public static int readCode(byte[] message) {
        byte[] code = { message[0], message[1], message[2], message[3] };

        return ByteBuffer.wrap(code).getInt();
    }//  w w w .j av  a  2  s  .  co  m
}

Related

  1. readBytes(final String file)
  2. readBytes(InputStream is)
  3. readBytes(Path file)
  4. readBytes(ReadableByteChannel channel, byte[] array)
  5. readBytes(String file)
  6. readColumnarKeyBlockDataForNoDictionaryCols(byte[] columnarKeyBlockData)
  7. readContent(File file)
  8. readContentsNIO(FileInputStream input, String encoding, boolean decodeNIO)
  9. readData(String fileName, int size)