public class PropReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_CONTENT_TYPE |
| Constructor and Description |
|---|
PropReader() |
PropReader(String charset,
org.zanata.common.LocaleId sourceLocale,
org.zanata.common.ContentState contentState) |
| Modifier and Type | Method and Description |
|---|---|
void |
extractTarget(org.zanata.rest.dto.resource.TranslationsResource doc,
InputStream in) |
void |
extractTemplate(org.zanata.rest.dto.resource.Resource doc,
InputStream in)
Reads properties from a given
InputStream and adds them to the
given Resource. |
public static final String PROP_CONTENT_TYPE
public PropReader(String charset, org.zanata.common.LocaleId sourceLocale, org.zanata.common.ContentState contentState)
charset - charset to use when reading .properties files (usually "ISO-8859-1")sourceLocale - "lang" attribute for source TextFlowscontentState - ContentState for new TextFlowTargets (typically Approved)public PropReader()
public void extractTarget(org.zanata.rest.dto.resource.TranslationsResource doc,
InputStream in)
throws IOException,
RuntimeException
IOExceptionRuntimeExceptionpublic void extractTemplate(org.zanata.rest.dto.resource.Resource doc,
InputStream in)
throws IOException,
RuntimeException
InputStream and adds them to the
given Resource.doc - the resource to add properties textflows toin - the input stream to read the properties fromIOExceptionInvalidPropertiesFormatExceptionRuntimeExceptionCopyright © 2013 Zanata Project. All Rights Reserved.