Package org.jzy3d.io
Class BufferUtil
- java.lang.Object
-
- org.jzy3d.io.BufferUtil
-
public class BufferUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description BufferUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float[]
copyFloat(FloatBuffer buffer)
Copy content of a direct float buffer as buffer.array() is an unsupported operationstatic void
flip(Buffer buffer)
static Coord3d
getCoordAt(FloatBuffer buffer, int i)
static List<Coord3d>
getCoords(FloatBuffer buffer)
static void
limit(Buffer buffer, int limit)
static void
rewind(Buffer buffer)
A simple utility to upcast buffers to invoke some of their methods without hitting compatibility issues between Java < 9 and Java 9+ https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip Useful if compiled with Java >9 and app run with Java <9
-
-
-
Method Detail
-
rewind
public static void rewind(Buffer buffer)
A simple utility to upcast buffers to invoke some of their methods without hitting compatibility issues between Java < 9 and Java 9+ https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip Useful if compiled with Java >9 and app run with Java <9
-
flip
public static void flip(Buffer buffer)
-
limit
public static void limit(Buffer buffer, int limit)
-
copyFloat
public static float[] copyFloat(FloatBuffer buffer)
Copy content of a direct float buffer as buffer.array() is an unsupported operation
-
getCoordAt
public static Coord3d getCoordAt(FloatBuffer buffer, int i)
-
getCoords
public static List<Coord3d> getCoords(FloatBuffer buffer)
-
-