public class PersistorToPropertiesFile extends PersistorToFile
Response.ContentType : application/xml Response.EntityBody : <?xml version="1.0"?><CUSTOMERList xmlns:xlink="http://www.w3.org/1999/xlink">\ \n <CUSTOMER xlink:href="http://www.thomas-bayer.com/sqlrest/CUSTOMER/0/">0</CUSTOMER>\ \n <CUSTOMER xlink:href="http://www.thomas-bayer.com/sqlrest/CUSTOMER/1/">1</CUSTOMER>\ \n</CUSTOMERList> Response.EntityLength : 0 Response.Headers : {Date=Mon, 12 Dec 2016 05:17:19 GMT, Content-Length=4762, Via=1.1 inetgw38 (squid), Connection=keep-alive, Content-Type=application/xml, X-Cache=MISS from inetgw38, Server=Apache-Coyote/1.1} Response.Request.Headers : Content-Type:application/octet-stream Accept:application/octet-streamNOTE: Be careful with the value occupying multiple lines in the properties file, which should be escaped as characters \ and \n, as showed in the example above.
Modifier and Type | Field and Description |
---|---|
static boolean |
PERSIST_CONTAINER |
filename, ignoredFieldsForUnpickle, persistFile, reader, writer
runtime
Constructor and Description |
---|
PersistorToPropertiesFile(RuntimeDataInterface runtime,
java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
escape(java.lang.String value)
Escape special characters such as value occupying multiple lines in the properties file,
which should be escaped as characters \ and \n.
|
void |
write(Persistable persistable)
Write the Persistable object into a persistent material.
PersistorToFile.writeHeader(Persistable) is called beforePersistorToFile.writeTailer(Persistable) is called after |
beforeUnpickle, doUnpickle, equals, getPersistenceName, getType, isIgnoredFiled, persist, stringNeedQuoted, unpersist, unpickle, writeHeader, writeTailer
validate
public static final boolean PERSIST_CONTAINER
public PersistorToPropertiesFile(RuntimeDataInterface runtime, java.lang.String filename)
runtime
- filename
- public void write(Persistable persistable) throws SAFSException, java.io.IOException
PersistorToFile
PersistorToFile.writeHeader(Persistable)
is called beforePersistorToFile.writeTailer(Persistable)
is called afterwrite
in class PersistorToFile
SAFSException
java.io.IOException
protected java.lang.String escape(java.lang.String value)
escape
in class PersistorToFile
value
- String, the value to escapePersistorToFile.stringNeedQuoted()
Copyright © SAS Institute. All Rights Reserved.