Package org.jzy3d.io

Class BufferUtil

java.lang.Object
org.jzy3d.io.BufferUtil

public class BufferUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float[]
    Copy content of a direct float buffer as buffer.array() is an unsupported operation
    static void
    flip(Buffer buffer)
     
    static Coord3d
    getCoordAt(FloatBuffer buffer, int i)
     
    static List<Coord3d>
     
    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 invalid input: '<' 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 invalid input: '<'9

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BufferUtil

      public BufferUtil()
  • Method Details

    • 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 invalid input: '<' 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 invalid input: '<'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)