public interface MwDumpFile
Modifier and Type | Interface and Description |
---|---|
static class |
MwDumpFile.DateComparator
Comparator to sort dumps by date.
|
Modifier and Type | Method and Description |
---|---|
String |
getDateStamp()
Returns the date stamp for this dump.
|
DumpContentType |
getDumpContentType()
Returns information about the content of the dump.
|
BufferedReader |
getDumpFileReader()
Returns a buffered reader that provides access to the (uncompressed) text
content of the dump file.
|
InputStream |
getDumpFileStream()
Returns an input stream that provides access to the (uncompressed) text
content of the dump file.
|
String |
getProjectName()
Returns the project name for this dump.
|
boolean |
isAvailable()
Checks if the dump is actually available.
|
void |
prepareDumpFile()
Prepares the dump file for access via
getDumpFileStream() or
getDumpFileReader() . |
boolean isAvailable()
getDumpFileReader()
. Depending on the type of dumpfile, this
will trigger one or more checks to make sure that all relevant data can
be accessed for this dump file. This is still no definite guarantee that
the download will succeed, since there can always be IO errors anyway,
but it helps to detect cases where the dump is clearly not in a usable
state.String getProjectName()
String getDateStamp()
DumpContentType getDumpContentType()
InputStream getDumpFileStream() throws IOException
It is important to close the stream after use.
IOException
- if the dump file contents could not be accessedBufferedReader getDumpFileReader() throws IOException
It is important to close the reader after use.
IOException
- if the dump file contents could not be accessedvoid prepareDumpFile() throws IOException
getDumpFileStream()
or
getDumpFileReader()
. In particular, this will download any
remote files.IOException
- if there was a problem preparing the filesCopyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage