code: @SuppressWarnings("unused")
      private void allocateBuffers(int numVertices, int numFaces, 
              boolean optimizedFaces, int faceBufferSize) {
          /* 
           * the allocated buffers are native order direct byte buffers, so they
           * can be passed directly to LWJGL or similar graphics APIs
           */
          
          /* ensure face optimization is possible */
          if (optimizedFaces && !isPureTriangle()) {
              throw new IllegalArgumentException("mesh is not purely triangular");
          }
          
          
          m_numVertices = numVertices;
          m_numFaces = numFaces;
          
          
          /* allocate for each vertex 3 floats */
          if (m_numVertices > 0) {
              m_vertices = ByteBuffer.allocateDirect(numVertices * 3 * 
                      SIZEOF_FLOAT);
              m_vertices.order(ByteOrder.nativeOrder());
          }
          
          
          if (m_numFaces > 0) {
              /* for optimized faces allocate 3 integers per face */ 
              if (optimizedFaces) {
                  m_faces = ByteBuffer.allocateDirect(numFaces * 3 * SIZEOF_INT);
                  m_faces.order(ByteOrder.nativeOrder());
              }
              /* 
               * for non-optimized faces allocate the passed in buffer size 
               * and allocate the face index structure
               */
              else {
                  m_faces = ByteBuffer.allocateDirect(faceBufferSize);
                  m_faces.order(ByteOrder.nativeOrder());
                  
                  m_faceOffsets = ByteBuffer.allocateDirect(numFaces * 
                          SIZEOF_INT);
                  m_faceOffsets.order(ByteOrder.nativeOrder());
              }
          }
      }
docs: This method is used by JNI. Do not call or modify.<p>
  
  Allocates byte buffers
  
  @param numVertices the number of vertices in the mesh
  @param numFaces the number of faces in the mesh
  @param optimizedFaces set true for optimized face representation
  @param faceBufferSize size of face buffer for non-optimized face
  representation