DBaseFileAttributePool { @SuppressWarnings("resource") @Pure public Object getRawValue(int recordNumber, String name, OutputParameter<AttributeType> type) throws AttributeException { try { final DBaseFileReader dbReader = getReader(); synchronized (dbReader) { dbReader.seek(recordNumber); final DBaseFileRecord record = dbReader.readNextDBFRecord(); if (record != null) { final int column = dbReader.getDBFFieldIndex(name); if (column >= 0) { final Object value = record.getFieldValue(column); final DBaseFieldType dbfType = dbReader.getDBFFieldType(column); type.set(dbfType.toAttributeType()); return value; } } throw new NoAttributeFoundException(name); } } catch (IOException e) { throw new AttributeException(e); } } private  DBaseFileAttributePool(URL dbaseFile); @Pure static DBaseFileAttributeProvider getContainer(URL dbaseFile, int recordNumber); @Pure static DBaseFileAttributeProvider getProvider(URI dbaseFile, int recordNumber); @Pure static DBaseFileAttributeProvider getProvider(File dbaseFile, int recordNumber); @Pure static DBaseFileAttributeProvider getProvider(String resource, int recordNumber); @Pure static DBaseFileAttributeCollection getCollection(URL dbaseFile, int recordNumber); @Pure static DBaseFileAttributeCollection getCollection(URI dbaseFile, int recordNumber); @Pure static DBaseFileAttributeCollection getCollection(File dbaseFile, int recordNumber); @Pure static DBaseFileAttributeCollection getCollection(String resource, int recordNumber); void close(); @Override @SuppressWarnings("checkstyle:nofinalizer") @Deprecated(since = "17.0", forRemoval = true) void finalize(); @Pure URL getResource(); @SuppressWarnings("resource") @Pure Collection<String> getAllAttributeNames(int recordNumber); @SuppressWarnings("resource") @Pure int getAttributeCount(); @SuppressWarnings("resource") @Pure Object getRawValue(int recordNumber, String name, OutputParameter<AttributeType> type);  }
@Test public void testGetRawValue() throws Exception { OutputParameter<AttributeType> type = new OutputParameter<>(); Object value; value = this.pool.getRawValue(1, "NATURE", type); assertEquals(AttributeType.STRING, type.get()); assertEquals(BATIMENT_RELIGIEUX_VALUE, value); value = this.pool.getRawValue(8, "SOURCE", type); assertEquals(AttributeType.STRING, type.get()); assertEquals(BDTOPO_VALUE, value); }