Example usage for org.apache.poi.util LittleEndian putLong

List of usage examples for org.apache.poi.util LittleEndian putLong

Introduction

In this page you can find the example usage for org.apache.poi.util LittleEndian putLong.

Prototype

public static void putLong(byte[] data, int offset, long value) 

Source Link

Document

put a long value into a byte array

Usage

From source file:org.ddt.ByteArrayUtils.java

License:Apache License

public static byte[] addLong(byte[] dest, long l) {
    byte[] result = Arrays.copyOf(dest, dest.length + LittleEndian.LONG_SIZE);
    LittleEndian.putLong(result, dest.length, l);
    return result;
}

From source file:org.dhatim.fastexcel.reader.ReadableWorkbook.java

License:Apache License

public static boolean isOLE2Header(byte[] bytes) {
    requireLength(bytes, 8);//from w  w w .j a va  2s.  c o  m
    byte[] ole2Header = new byte[8];
    LittleEndian.putLong(ole2Header, 0, HeaderBlockConstants._signature);
    return arrayEquals(bytes, 0, ole2Header, 0, ole2Header.length);
}