Example usage for org.apache.commons.io EndianUtils readSwappedFloat

List of usage examples for org.apache.commons.io EndianUtils readSwappedFloat

Introduction

In this page you can find the example usage for org.apache.commons.io EndianUtils readSwappedFloat.

Prototype

public static float readSwappedFloat(InputStream input) throws IOException 

Source Link

Document

Reads a "float" value from an InputStream.

Usage

From source file:com.cyc.tool.distributedrepresentations.Word2VecSpaceFromFile.java

private float getFloat(DataInputStream s) {
    try {/*from w ww. ja  v a  2s .  co  m*/
        float v = EndianUtils.readSwappedFloat(s);
        //System.out.println(st+"["+i+"]: "+v);
        return v;
    } catch (IOException ex) {
        Logger.getLogger(Word2VecSpace.class.getName()).log(Level.SEVERE, null, ex);
        return 0.0f;
    }
}