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)
Deprecated.
|
void |
extractTarget(org.zanata.rest.dto.resource.TranslationsResource doc,
InputStream in,
org.zanata.rest.dto.resource.Resource srcDoc) |
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()
@Deprecated public void extractTarget(org.zanata.rest.dto.resource.TranslationsResource doc, InputStream in) throws IOException, RuntimeException
IOException
RuntimeException
public void extractTarget(org.zanata.rest.dto.resource.TranslationsResource doc, InputStream in, org.zanata.rest.dto.resource.Resource srcDoc) throws IOException, RuntimeException
IOException
RuntimeException
public 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 fromIOException
InvalidPropertiesFormatException
RuntimeException
Copyright © 2014 Zanata Project. All rights reserved.