public final class ProductionReader extends NpdReader<Production.Entry>
This class is thread-safe.
Constructor and Description |
---|
ProductionReader(String url)
Create a reader for NPD field production.
|
Modifier and Type | Method and Description |
---|---|
void |
read(NpdField field)
Read production enntries for the specified field and populate
its production member.
|
static void |
readAll(NpdField field)
Read all production enntries for the specified field and populate
its production member.
|
public ProductionReader(String url)
url
- Location of file to read. Non-null.IllegalArgumentException
- If url is null.public void read(NpdField field) throws IOException
field
- Field to read production of. Non-null.IllegalArgumentException
- If field is null.IOException
- If the read operation fails for some reason.public static void readAll(NpdField field) throws IOException
This is a convenient alternative to the more flexible and generic approach where the URL location of the data is provided by the client:
ProductionReader reader = new ProductionReader(url); reader.read(field);
field
- Field to read production of. Non-null.IllegalArgumentException
- If field is null.IOException
- If the read operation fails for some reason.Copyright © 2018 Petroware AS - https://petroware.no