Header { public double[] getDataOffsetValues() { return headerParser.getDoubles(EnviConstants.HEADER_KEY_DATA_OFFSET_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 testParseOffsetValues() throws IOException { double[] expectedOffsetValues = {0.01000000, 1.45, 0.0367654321}; final String line = String.format("data offset values = {%f,%f,\n%.10f}", expectedOffsetValues[0], expectedOffsetValues[1], expectedOffsetValues[2]); final BufferedReader in = createReader(createMandatoryHeader() + line); final Header header = new Header(in); double[] actualOffsetValues = header.getDataOffsetValues(); assertArrayEquals(expectedOffsetValues, actualOffsetValues,1e-10); }