public class CollectionGlob extends CollectionAbstract
CollectionAbstract.DateSorter, CollectionAbstract.MyStreamFilter
auxInfo, CATALOG, collectionName, dateExtractor, DIR, FILE, GLOB, lastModified, LIST, logger, NCX_SUFFIX, protoChoice, root, sfilter, startCollection
Constructor and Description |
---|
CollectionGlob(String collectionName,
String glob,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and release any resources.
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
static DirectoryStream |
newDirectoryStream(Path dir,
String glob) |
cleanName, extractDate, getAuxInfo, getCollectionName, getFilenames, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, makeFileListSorted, open, parseOlderThanString, putAuxInfo, setDateExtractor, setRoot, setStreamFilter
public void close()
MCollection
public Iterable<MFile> getFilesSorted() throws IOException
MCollection
IOException
public CloseableIterator<MFile> getFileIterator() throws IOException
MCollection
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
IOException
public static DirectoryStream newDirectoryStream(Path dir, String glob) throws IOException
IOException
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.