Header { public double[] getDataGainValues() { return headerParser.getDoubles(EnviConstants.HEADER_KEY_DATA_GAIN_VALUES); } Header(final BufferedReader reader); ByteOrder getJavaByteOrder(); String getFileType(); int getNumSamples(); int getNumLines(); int getNumBands(); int getHeaderOffset(); int getDataType(); String getInterleave(); String getSensorType(); int getByteOrder(); EnviMapInfo getMapInfo(); EnviProjectionInfo getProjectionInfo(); String[] getBandNames(); String getDescription(); BeamProperties getBeamProperties(); String[] getWavelengths(); String[] getFWHM(); String getWavelengthsUnit(); double[] getDataOffsetValues(); double[] getDataGainValues(); Double getDataIgnoreValue(); int getNumClasses(); String[] getClassNmaes(); int[] getClassColorRGB(); static Properties loadProperties(String text); MetadataElement getAsMetadata();  }
@Test public void testParseGainValues() throws IOException { double[] expectedOffsetValues = {10, 0.0045, 1.987654321}; final String line = String.format("data gain values = {%f\n,%f,%.10f}", expectedOffsetValues[0], expectedOffsetValues[1], expectedOffsetValues[2]); final BufferedReader in = createReader(createMandatoryHeader() + line); final Header header = new Header(in); double[] actualOffsetValues = header.getDataGainValues(); assertArrayEquals(expectedOffsetValues, actualOffsetValues,1e-10); }