Class POHelper
- java.lang.Object
-
- org.jabylon.properties.types.impl.POHelper
-
- All Implemented Interfaces:
PropertyConverter
public class POHelper extends Object implements PropertyConverter
- Author:
- Johannes Utzig (jutzig.dev@googlemail.com)
-
-
Constructor Summary
Constructors Constructor Description POHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyFileload(InputStream in, String encoding)loads the given input stream and transform it into aPropertyFilestatic voidmain(String[] args)PropertyreadProperty(BufferedReader reader)intwrite(OutputStream out, PropertyFile file, String encoding)serializes the givenPropertyFileinto the output steam
-
-
-
Method Detail
-
readProperty
public Property readProperty(BufferedReader reader) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
- Parameters:
args-- Throws:
IOException
-
load
public PropertyFile load(InputStream in, String encoding) throws IOException
Description copied from interface:PropertyConverterloads the given input stream and transform it into aPropertyFileThe implementation is expected to close the stream upon completion
- Specified by:
loadin interfacePropertyConverterencoding- hint about which encoding to use- Returns:
- Throws:
IOException
-
write
public int write(OutputStream out, PropertyFile file, String encoding) throws IOException
Description copied from interface:PropertyConverterserializes the givenPropertyFileinto the output steamThe implementation is expected to close the stream upon completion
The implementation is free to optimize the output by removing empty translations.
- Specified by:
writein interfacePropertyConverterencoding- hint about which encoding to use- Returns:
- number of translated (non-empty) keys
- Throws:
IOException
-
-