jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Public Member Functions | List of all members
org.jau.pkg.TempJarSHASum Class Reference

SHASum specialization utilizing TempJarCache to access jar file content for SHA computation More...

Inheritance diagram for org.jau.pkg.TempJarSHASum:
Collaboration diagram for org.jau.pkg.TempJarSHASum:

Public Member Functions

 TempJarSHASum (final MessageDigest digest, final Class<?> jarclazz, final List< Pattern > excludes, final List< Pattern > includes) throws SecurityException, IllegalArgumentException, IOException, URISyntaxException
 Instance to ensure proper compute(boolean) of identical SHA sums over same contents within given paths across machines. More...
 
final String getOrigin ()
 
- Public Member Functions inherited from org.jau.sec.SHASum
 SHASum (final MessageDigest digest, final List< String > origins, final List< Pattern > excludes, final List< Pattern > includes)
 Instance to ensure proper compute(boolean) of identical SHA sums over same contents within given paths across machines. More...
 
final byte[] compute (final boolean verbose) throws IOException
 Implementation gathers all files traversing through given paths via IOUtil#filesOf(List, List, List), sorts the resulting file list via sort(ArrayList) and finally calculates the SHA sum over its byte content via updateDigest(MessageDigest, List). More...
 
final List< String > getOrigins ()
 
final List< Pattern > getExcludes ()
 
final List< Pattern > getIncludes ()
 

Additional Inherited Members

- Static Public Member Functions inherited from org.jau.sec.SHASum
static long updateDigest (final MessageDigest digest, final List< String > filenames) throws IOException
 Updates the given digest with the bytes contained by the files denoted by the given filenames in the given order. More...
 
static StringBuilder toHexString (final byte[] shasum, StringBuilder sb)
 Simple helper to print the given byte-array into a string, here appended to StringBuilder. More...
 
static List< String > sort (final ArrayList< String > source)
 Returns the sorted list of given strings using String#compareTo(String)'s lexicographically comparison. More...
 
static void main (final String[] args) throws IOException
 Main entry point taking var-arg path or gnu-arguments with a leading '–'. More...
 

Detailed Description

SHASum specialization utilizing TempJarCache to access jar file content for SHA computation

Definition at line 42 of file TempJarSHASum.java.

Constructor & Destructor Documentation

◆ TempJarSHASum()

org.jau.pkg.TempJarSHASum.TempJarSHASum ( final MessageDigest  digest,
final Class<?>  jarclazz,
final List< Pattern >  excludes,
final List< Pattern >  includes 
) throws SecurityException, IllegalArgumentException, IOException, URISyntaxException

Instance to ensure proper compute(boolean) of identical SHA sums over same contents within given paths across machines.

Instantiation of this class is lightweight, compute(boolean) performs all operations.

TempJarCache#getTempFileCache()'s TempFileCache#getTempDir() is used as origin for IOUtil#filesOf(List, List, List)

Parameters
digestthe SHA algorithm
jarclazza class from the desired classpath jar file used for TempJarCache#addAll(Class, com.jogamp.common.net.Uri)
excludesthe optional exclude patterns to be used for IOUtil#filesOf(List, List, List)
includesthe optional include patterns to be used for IOUtil#filesOf(List, List, List)
Exceptions
SecurityException
IllegalArgumentException
IOException
URISyntaxException

Definition at line 61 of file TempJarSHASum.java.

Here is the call graph for this function:

Member Function Documentation

◆ getOrigin()

final String org.jau.pkg.TempJarSHASum.getOrigin ( )

Definition at line 69 of file TempJarSHASum.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: