Example usage for com.google.common.io ByteStreamsHack toByteArray

List of usage examples for com.google.common.io ByteStreamsHack toByteArray

Introduction

In this page you can find the example usage for com.google.common.io ByteStreamsHack toByteArray.

Prototype

public static byte[] toByteArray(InputStream inputStream, long expectedSize) throws IOException 

Source Link

Usage

From source file:lanchon.multidexlib2.RawDexIO.java

public static DexBackedDexFile readRawDexFile(InputStream inputStream, long expectedSize, Opcodes opcodes)
        throws IOException {
    // TODO: Remove hack when issue is fixed: https://github.com/google/guava/issues/2616
    //byte[] buf = ByteStreams.toByteArray(inputStream);
    byte[] buf = ByteStreamsHack.toByteArray(inputStream, expectedSize);
    return readRawDexFile(buf, 0, opcodes);
}