DBaseFileAttributePool { @Pure protected DBaseFileReader getReader() throws IOException { if (this.reader == null) { this.reader = new DBaseFileReader(this.url.openStream()); this.reader.readDBFHeader(); this.reader.readDBFFields(); } return this.reader; } 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 testGetReader() throws Exception { DBaseFileReader reader = this.pool.getReader(); assertNotNull(reader); DBaseFileRecord record = reader.readNextDBFRecord(); assertNotNull(record); assertEquals(0, record.getRecordIndex()); assertEquals(161, record.getRecordOffset()); assertEquals(BDTOPO_VALUE, record.getFieldValue(0)); assertEquals("Religieux", record.getFieldValue(1)); assertEquals(BATIMENT_RELIGIEUX_VALUE, record.getFieldValue(2)); assertEquals(15., record.getFieldValue(3)); }