Top Fields Constructors Methods
com.mchange.util.impl

public Class SyncedProperties

extends Object
Class Inheritance
Imports
java.io.*, java.util.*, com.mchange.io.InputStreamUtils, .OutputStreamUtils

Field Summary

Modifier and TypeField and Description
private static final String
pack-priv File
private static final byte[]
private static final byte
pack-priv byte[]
pack-priv long
pack-priv Properties
private static final String[]

Constructor Summary

AccessConstructor and Description
public
public
SyncedProperties(File file, String[] header)

public
private
SyncedProperties(File file, byte[] headerBytes)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized boolean
public synchronized boolean
public synchronized Enumeration<E>
private synchronized void
public synchronized String
getProperty(String property)

public synchronized String
getProperty(String property, String defaultValue)

public synchronized boolean
public synchronized Enumeration<E>
keys()

private static byte[]
private static byte[]
public synchronized void
put(String property, String value)

public synchronized void
remove(String property)

private synchronized void
public synchronized int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ASCIIback to summary
private static final String ASCII
fileback to summary
pack-priv File file
H_LF_BYTESback to summary
private static final byte[] H_LF_BYTES
H_START_BYTEback to summary
private static final byte H_START_BYTE
headerBytesback to summary
pack-priv byte[] headerBytes
last_modback to summary
pack-priv long last_mod
propsback to summary
pack-priv Properties props
SA_TEMPLATEback to summary
private static final String[] SA_TEMPLATE

Constructor Detail

SyncedPropertiesback to summary
public SyncedProperties(File file, String header) throws IOException
SyncedPropertiesback to summary
public SyncedProperties(File file, String[] header) throws IOException
SyncedPropertiesback to summary
public SyncedProperties(File file) throws IOException
SyncedPropertiesback to summary
private SyncedProperties(File file, byte[] headerBytes) throws IOException

Method Detail

clearback to summary
public synchronized void clear() throws IOException
containsback to summary
public synchronized boolean contains(String value) throws IOException
containsKeyback to summary
public synchronized boolean containsKey(String key) throws IOException
elementsback to summary
public synchronized Enumeration<E> elements() throws IOException
ensureUpToDateback to summary
private synchronized void ensureUpToDate() throws IOException
getPropertyback to summary
public synchronized String getProperty(String property) throws IOException
getPropertyback to summary
public synchronized String getProperty(String property, String defaultValue) throws IOException
isEmptyback to summary
public synchronized boolean isEmpty() throws IOException
keysback to summary
public synchronized Enumeration<E> keys() throws IOException
makeHeaderBytesback to summary
private static byte[] makeHeaderBytes(String[] header)
makeHeaderBytesback to summary
private static byte[] makeHeaderBytes(String header)
putback to summary
public synchronized void put(String property, String value) throws IOException
removeback to summary
public synchronized void remove(String property) throws IOException
rewritePropsFileback to summary
private synchronized void rewritePropsFile() throws IOException
sizeback to summary
public synchronized int size() throws IOException