public class Dataset extends Dataset
Extends Dataset
Created by StreamFactory.
Since stream works with file directly a pool of readers is maintained until
the dataset is closed. Class provides extra methods to check how many readers
were created and how many are currently free to use.
| Modifier and Type | Field and Description |
|---|---|
Pool |
pool
A pool of data readers.
|
age, components, copyright, copyrightOffset, csvBufferLength, deviceCombinations, export, format, formatOffset, highestCharacter, jsonBufferLength, lastModified, lowestCharacter, maps, maximumRank, maxSignatures, maxSignaturesClosest, maxUserAgentLength, maxValues, minUserAgentCount, minUserAgentLength, mode, nameOffset, nextUpdate, nodeRankedSignatureIndexes, nodes, profileOffsets, profiles, properties, published, rankedSignatureIndexes, rootNodes, signatureNodeOffsets, signatureNodesCount, signatureProfilesCount, signatures, strings, tag, values, version, versionEnum, xmlBufferLength| Constructor and Description |
|---|
Dataset(byte[] data,
Modes mode)
Creates a dataset object with a pool of readers used to retrieve data
from the data file represented as an array of bytes.
|
Dataset(String fileName,
Date lastModified,
Modes mode,
boolean isTempFile)
Creates a dataset object with a pool of readers used to retrieve data
from the data file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Dispose of the dataset and the pool of readers.
|
int |
getReadersCreated() |
int |
getReadersQueued() |
void |
resetCache()
Resets the cache for the data set.
|
findProfile, get, getAge, getBrowsers, getComponent, getComponents, getCopyright, getCrawlers, getDisposed, getFormat, getHardware, getHttpHeaders, getMaps, getMaximumRank, getMinUserAgentLength, getName, getNodeCacheSwitches, getNodeRankedSignatureIndexes, getNodes, getNodesCount, getPercentageNodeCacheMisses, getPercentageProfilesCacheMisses, getPercentageRankedSignatureCacheMisses, getPercentageSignatureCacheMisses, getPercentageStringsCacheMisses, getPercentageValuesCacheMisses, getProfiles, getProfilesCacheSwitches, getProfilesCount, getProperties, getPropertyByName, getRankedSignatureCacheSwitches, getRankedSignatureIndexes, getSignatureCacheSwitches, getSignatureNodeOffsets, getSignatures, getSoftware, getStringsCacheSwitches, getValues, getValuesCacheSwitches, init, initComponents, initNodes, initProfiles, initProperties, initSignatures, initValuespublic final Pool pool
public Dataset(String fileName, Date lastModified, Modes mode, boolean isTempFile) throws IOException
lastModified - Date and time the source data was last modified.fileName - Valid path to the uncompressed data set file.mode - Mode The mode of operation the data set will be using.isTempFile - True if the file should be deleted when the source is
disposedIOException - if there was a problem accessing data file.public Dataset(byte[] data,
Modes mode)
throws IOException
data - array of bytes to read from.mode - The mode of operation the data set will be using.IOException - if there was a problem accessing data file.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DatasetIOException - if there was a problem accessing data file.public void resetCache()
resetCache in class Datasetpublic int getReadersCreated()
public int getReadersQueued()
Copyright © 2015 51Degrees. All rights reserved.