All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reactivefeign.benchmarks.BenchmarkUtils Maven / Gradle / Ivy

package reactivefeign.benchmarks;

import java.io.IOException;
import java.io.InputStream;

public class BenchmarkUtils {

    public static String readJsonFromFile(String path) throws IOException {
        InputStream is = BenchmarkUtils.class.getResourceAsStream(path);
        byte data[]=new byte[is.available()];
        is.read(data);
        is.close();
        return new String(data);
    }

    public static byte[] readJsonFromFileAsBytes(String path) throws IOException {
        InputStream is = BenchmarkUtils.class.getResourceAsStream(path);
        byte data[]=new byte[is.available()];
        is.read(data);
        is.close();
        return data;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy