/** * Add the floats read from the given {@link ObjectInputStream} to the direct texture {@link FloatBuffer}, if the * direct texture buffer does not have the capacity this method will return -1. This method assumes that the stream * is positioned so, that the next value is an int, declaring the size of the number of floats to be read. * * @param in * the stream to get the floats from. * @return the position of the copy in the texture buffer or -1 if the given buffer could not be copied in the * direct buffer. * @throws IOException * if the stream throws this exception while reading. */ public synchronized int readTexCoordsFromStream( ObjectInputStream in ) throws IOException { return addFromStream( textureBuffer, in ); }