@Test public void testReadNextValuesDefaultPattern() throws Exception { FloatReader classUnderTest = new FloatReader(is); float expected = 0.0f; float[] values = new float[]{-9999}; for (int i = 0; i < 100; i++) { classUnderTest.readNextValues(values); assertEquals(expected, values[0], 0.001); expected += 0.3f; values[0] = -9999f; } }
synchronized public void readNextValues(float[] values) throws IOException { Validate.notNull(values, "A values array is required"); Validate.isTrue(values.length >= groupSize, "Provided values array has length " + values.length + ". Must have at least " + groupSize + " elements to read float group"); for (int i = 0; i < groupSize; i++) { values[i] = readFloat(); if (i != groupSize - 1) { skipToNextValueInGroup(); } } skipToStartOfNextGroup(); }
FloatReader { synchronized public void readNextValues(float[] values) throws IOException { Validate.notNull(values, "A values array is required"); Validate.isTrue(values.length >= groupSize, "Provided values array has length " + values.length + ". Must have at least " + groupSize + " elements to read float group"); for (int i = 0; i < groupSize; i++) { values[i] = readFloat(); if (i != groupSize - 1) { skipToNextValueInGroup(); } } skipToStartOfNextGroup(); } }
FloatReader { synchronized public void readNextValues(float[] values) throws IOException { Validate.notNull(values, "A values array is required"); Validate.isTrue(values.length >= groupSize, "Provided values array has length " + values.length + ". Must have at least " + groupSize + " elements to read float group"); for (int i = 0; i < groupSize; i++) { values[i] = readFloat(); if (i != groupSize - 1) { skipToNextValueInGroup(); } } skipToStartOfNextGroup(); } FloatReader(InputStream is); private  FloatReader(InputStream is, int offset, int groupSize, int groupSeparation, int groupValueGap, FloatFormat format, ByteOrder byteOrder); }
FloatReader { synchronized public void readNextValues(float[] values) throws IOException { Validate.notNull(values, "A values array is required"); Validate.isTrue(values.length >= groupSize, "Provided values array has length " + values.length + ". Must have at least " + groupSize + " elements to read float group"); for (int i = 0; i < groupSize; i++) { values[i] = readFloat(); if (i != groupSize - 1) { skipToNextValueInGroup(); } } skipToStartOfNextGroup(); } FloatReader(InputStream is); private  FloatReader(InputStream is, int offset, int groupSize, int groupSeparation, int groupValueGap, FloatFormat format, ByteOrder byteOrder); synchronized void readNextValues(float[] values); synchronized float[] readNextValues(); synchronized void skipToNextGroup(); synchronized void skip(long numBytes); int getOffset(); int getGroupSize(); int getGroupSeparation(); int getGroupValueGap(); FloatFormat getFormat(); ByteOrder getByteOrder(); }
FloatReader { synchronized public void readNextValues(float[] values) throws IOException { Validate.notNull(values, "A values array is required"); Validate.isTrue(values.length >= groupSize, "Provided values array has length " + values.length + ". Must have at least " + groupSize + " elements to read float group"); for (int i = 0; i < groupSize; i++) { values[i] = readFloat(); if (i != groupSize - 1) { skipToNextValueInGroup(); } } skipToStartOfNextGroup(); } FloatReader(InputStream is); private  FloatReader(InputStream is, int offset, int groupSize, int groupSeparation, int groupValueGap, FloatFormat format, ByteOrder byteOrder); synchronized void readNextValues(float[] values); synchronized float[] readNextValues(); synchronized void skipToNextGroup(); synchronized void skip(long numBytes); int getOffset(); int getGroupSize(); int getGroupSeparation(); int getGroupValueGap(); FloatFormat getFormat(); ByteOrder getByteOrder();  }