YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.share.IncomingFileNames Class Reference

File names in the app's cache/incoming/ directory (copies of provider files that cannot seek). More...

Collaboration diagram for de.yaacc.share.IncomingFileNames:
Collaboration graph

Static Public Member Functions

static String randomName (Consumer< byte[]> randomBytes)
 
static boolean isOurIncomingName (String name)
 

Detailed Description

File names in the app's cache/incoming/ directory (copies of provider files that cannot seek).

Plain Java. A name is share- plus 32 random lower-case hex chars plus .bin: never derived from provider data (a provider name could hold path separators or collide), and recognisable strictly, so the sweep at app start deletes only files this app created there.

Member Function Documentation

◆ isOurIncomingName()

static boolean de.yaacc.share.IncomingFileNames.isOurIncomingName ( String name)
static
Returns
true only for exactly the shape randomName produces: the prefix, 32 lower-case ASCII hex chars, the suffix; nothing is trimmed or case-folded, null is false

Referenced by de.yaacc.share.IncomingCache.sweep().

Here is the caller graph for this function:

◆ randomName()

static String de.yaacc.share.IncomingFileNames.randomName ( Consumer< byte[]> randomBytes)
static
Parameters
randomBytesfills the given array with random bytes (e.g. secureRandom::nextBytes)
Returns
a new name such as share-0123456789abcdef0123456789abcdef.bin
Exceptions
IllegalArgumentExceptionif the random source is null

Referenced by de.yaacc.share.IncomingCache.createCopyFile().

Here is the caller graph for this function:

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