Package org.apache.maven.index.reader
Class Utils
java.lang.Object
org.apache.maven.index.reader.Utils
Reusable code snippets and constants.
- Since:
- 5.1.2
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic RecordallGroups(Collection<String> allGroups) Creates a record of typeRecord.Type.ALL_GROUPS.static Recorddescriptor(String repoId) Creates a record of typeRecord.Type.DESCRIPTOR.static PropertiesloadProperties(InputStream inputStream) Creates and loadsPropertiesfrom providedInputStreamand closes the stream.static PropertiesloadProperties(ResourceHandler.Resource resource) Creates and loadsPropertiesfrom providedResourceHandler.Resourceif exists, and closes the resource.static StringHelper to translatenullinto "NA" (not available) value.static StringHelper to translate the "NA" (not available) input intonullvalue.static StringReturns the "root group" of given groupId.static RecordrootGroups(Collection<String> rootGroups) Creates a record of typeRecord.Type.ROOT_GROUPS.static voidstoreProperties(OutputStream outputStream, Properties properties) SavesPropertiesto providedOutputStreamand closes the stream.static voidstoreProperties(WritableResourceHandler.WritableResource writableResource, Properties properties) SavesPropertiesto providedWritableResourceHandler.WritableResourceand closes the resource.
-
Field Details
-
INDEX_FILE_PREFIX
- See Also:
-
INDEX_DATE_FORMAT
-
FIELD_SEPARATOR
- See Also:
-
NOT_AVAILABLE
- See Also:
-
UINFO
- See Also:
-
INFO
- See Also:
-
FS_PATTERN
-
-
Method Details
-
loadProperties
Creates and loadsPropertiesfrom providedInputStreamand closes the stream.- Throws:
IOException
-
loadProperties
Creates and loadsPropertiesfrom providedResourceHandler.Resourceif exists, and closes the resource. If not exists, returnsnull.- Throws:
IOException
-
storeProperties
public static void storeProperties(OutputStream outputStream, Properties properties) throws IOException SavesPropertiesto providedOutputStreamand closes the stream.- Throws:
IOException
-
storeProperties
public static void storeProperties(WritableResourceHandler.WritableResource writableResource, Properties properties) throws IOException SavesPropertiesto providedWritableResourceHandler.WritableResourceand closes the resource.- Throws:
IOException
-
descriptor
Creates a record of typeRecord.Type.DESCRIPTOR. -
allGroups
Creates a record of typeRecord.Type.ALL_GROUPS. -
rootGroups
Creates a record of typeRecord.Type.ROOT_GROUPS. -
renvl
Helper to translate the "NA" (not available) input intonullvalue. -
nvl
Helper to translatenullinto "NA" (not available) value. -
rootGroup
Returns the "root group" of given groupId.
-