MCPcopy Create free account
hub / github.com/diffplug/matfilerw / getByteArray

Method getByteArray

src/main/java/com/jmatio/types/MLSingle.java:33–38  ·  view source on GitHub ↗
(Float value)

Source from the content-addressed store, hash-verified

31 }
32
33 public byte[] getByteArray(Float value) {
34 int byteAllocated = getBytesAllocated();
35 ByteBuffer buff = ByteBuffer.allocate(byteAllocated);
36 buff.putFloat(value);
37 return buff.array();
38 }
39
40 public int getBytesAllocated() {
41 return Float.SIZE >> 3;

Callers

nothing calls this directly

Calls 2

getBytesAllocatedMethod · 0.95
allocateMethod · 0.45

Tested by

no test coverage detected