public class ImageArchiveUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MANIFEST_JSON |
Constructor and Description |
---|
ImageArchiveUtil() |
Modifier and Type | Method and Description |
---|---|
static Map<String,ImageArchiveManifestEntry> |
findEntriesByRepoTagPattern(Pattern repoTagPattern,
ImageArchiveManifest manifest)
Search the manifest for an entry that has a repository and tag matching the provided pattern.
|
static Map<String,ImageArchiveManifestEntry> |
findEntriesByRepoTagPattern(String repoTagPattern,
ImageArchiveManifest manifest)
Search the manifest for an entry that has a repository and tag matching the provided pattern.
|
static ImageArchiveManifestEntry |
findEntryByRepoTag(String repoTag,
ImageArchiveManifest manifest)
Search the manifest for an entry that has the repository and tag provided.
|
static org.apache.commons.lang3.tuple.Pair<String,ImageArchiveManifestEntry> |
findEntryByRepoTagPattern(Pattern repoTagPattern,
ImageArchiveManifest manifest)
Search the manifest for an entry that has a repository and tag matching the provided pattern.
|
static org.apache.commons.lang3.tuple.Pair<String,ImageArchiveManifestEntry> |
findEntryByRepoTagPattern(String repoTagPattern,
ImageArchiveManifest manifest)
Search the manifest for an entry that has a repository and tag matching the provided pattern.
|
static Map<String,ImageArchiveManifestEntry> |
mapEntriesById(Iterable<ImageArchiveManifestEntry> entries)
Build a map of entries by id from an iterable of entries.
|
static ImageArchiveManifest |
readManifest(File file)
Read the (possibly compressed) image archive provided and return the archive manifest.
|
static ImageArchiveManifest |
readManifest(InputStream inputStream)
Read the (possibly compressed) image archive stream provided and return the archive manifest.
|
public static final String MANIFEST_JSON
public static ImageArchiveManifest readManifest(File file) throws IOException, com.google.gson.JsonParseException
file
- IOException
com.google.gson.JsonParseException
public static ImageArchiveManifest readManifest(InputStream inputStream) throws IOException, com.google.gson.JsonParseException
inputStream
- IOException
com.google.gson.JsonParseException
public static ImageArchiveManifestEntry findEntryByRepoTag(String repoTag, ImageArchiveManifest manifest)
repoTag
- the repository and tag to search (e.g. busybox:latest).manifest
- the manifest to be searchedpublic static org.apache.commons.lang3.tuple.Pair<String,ImageArchiveManifestEntry> findEntryByRepoTagPattern(String repoTagPattern, ImageArchiveManifest manifest) throws PatternSyntaxException
repoTagPattern
- the repository and tag to search (e.g. busybox:latest).manifest
- the manifest to be searchedPatternSyntaxException
public static org.apache.commons.lang3.tuple.Pair<String,ImageArchiveManifestEntry> findEntryByRepoTagPattern(Pattern repoTagPattern, ImageArchiveManifest manifest) throws PatternSyntaxException
repoTagPattern
- the repository and tag to search (e.g. busybox:latest).manifest
- the manifest to be searchedPatternSyntaxException
public static Map<String,ImageArchiveManifestEntry> findEntriesByRepoTagPattern(String repoTagPattern, ImageArchiveManifest manifest) throws PatternSyntaxException
repoTagPattern
- the repository and tag to search (e.g. busybox:latest).manifest
- the manifest to be searchedPatternSyntaxException
public static Map<String,ImageArchiveManifestEntry> findEntriesByRepoTagPattern(Pattern repoTagPattern, ImageArchiveManifest manifest) throws PatternSyntaxException
repoTagPattern
- the repository and tag to search (e.g. busybox:latest).manifest
- the manifest to be searchedPatternSyntaxException
public static Map<String,ImageArchiveManifestEntry> mapEntriesById(Iterable<ImageArchiveManifestEntry> entries)
entries
- Copyright © 2021. All rights reserved.