Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
/ stringmappersist Public archive

Persistence of Map using same format as java.util.Properties (load/store), but ordered maintained

License

Notifications You must be signed in to change notification settings

ggrandes/stringmappersist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stringmappersist

Persistence of Map using same format as java.util.Properties (load/store), but ordered maintained. Open Source Java project under GNU General Public License, version 2, with the Classpath Exception.

Current Stable Version is 1.0.0


DOC

Usage Example

import org.javastack.stringmappersist.StringMapPersist;

public class Example {
	public static void main(final String[] args) throws Throwable {
		Map<String, String> map = new LinkedHashMap<String, String>();
		StringMapPersist p = new StringMapPersist(map);
		map.put("state", "awake");
		map.put("msg", "Hi user, how are you?");
		p.store(System.out, "DATA");
	}
}
The Result:
state=awake
msg=Hi user, how are you?

MAVEN

Add the dependency to your pom.xml:

<dependency>
    <groupId>org.javastack</groupId>
    <artifactId>stringmappersist</artifactId>
    <version>1.0.0</version>
</dependency>

Inspired in Java Properties, this code is for compatibility format.

About

Persistence of Map using same format as java.util.Properties (load/store), but ordered maintained

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages