Uses of Class
opennlp.tools.util.ResourceInstaller.Budget
Packages that use ResourceInstaller.Budget
-
Uses of ResourceInstaller.Budget in opennlp.tools.util
Fields in opennlp.tools.util declared as ResourceInstaller.BudgetModifier and TypeFieldDescriptionprivate final ResourceInstaller.BudgetResourceInstaller.BudgetInputStream.budgetMethods in opennlp.tools.util that return ResourceInstaller.BudgetModifier and TypeMethodDescriptionprivate static ResourceInstaller.BudgetResourceInstaller.expansionBudget(long compressedSize, ResourceInstaller.Limits limits, ResourceInstaller.Budget budget) Bounds expansion by the ratio as well as the absolute limit, so a small source cannot expand to the whole absolute limit.Methods in opennlp.tools.util with parameters of type ResourceInstaller.BudgetModifier and TypeMethodDescriptionprivate static voidResourceInstaller.consumeBounded(InputStream in, ResourceInstaller.Budget budget) Reads and discards an entry while charging each byte against the expansion limit.private static voidResourceInstaller.copyBounded(InputStream in, Path file, ResourceInstaller.Budget budget) Copies the stream into the file, charging every byte against the budget before it is written, so an oversized transfer aborts within one buffer of its limit.private static voidResourceInstaller.downloadHttp(URI source, Path file, ResourceInstaller.Limits limits, ResourceInstaller.Budget budget) Fetches an http or https source with connection and read timeouts, following at most the allowed number of redirects under the redirect policy, checking any declared content length against the download limit before reading the body, and bounding the transferred bytes against the same limit.private static ResourceInstaller.BudgetResourceInstaller.expansionBudget(long compressedSize, ResourceInstaller.Limits limits, ResourceInstaller.Budget budget) Bounds expansion by the ratio as well as the absolute limit, so a small source cannot expand to the whole absolute limit.private static voidResourceInstaller.unpackGzip(InputStream raw, String name, Path staging, ResourceInstaller.Budget budget, ResourceInstaller.Budget entryBudget) Unpacks gzip content: a tar archive inside when present, a plain file otherwise.private static voidResourceInstaller.unpackTar(InputStream decompressed, Path staging, ResourceInstaller.Budget entryBudget) Unpacks every regular tar entry to its relative location beneath the staging directory.ResourceInstaller.unpackZip(InputStream raw, Path staging, ResourceInstaller.Budget budget, ResourceInstaller.Budget entryBudget) Unpacks every regular zip entry to its relative location beneath the staging directory.Constructors in opennlp.tools.util with parameters of type ResourceInstaller.BudgetModifierConstructorDescription(package private)BudgetInputStream(InputStream in, ResourceInstaller.Budget budget) Initializes a budgeted stream.