org.eclipse.xtext.nodemodel.serialization
Class SerializationUtil
java.lang.Object
org.eclipse.xtext.nodemodel.serialization.SerializationUtil
public class SerializationUtil
- extends java.lang.Object
- Since:
- 2.3
- Author:
- mark.christiaens - Initial contribution and API
- This class is not intended to be subclassed by clients.
- This class is not intended to be subclassed by clients.
- This class is not intended to be instantiated by clients.
- This class is not intended to be instantiated by clients.
Field Summary |
static int |
KIB
|
Method Summary |
static void |
fillIdToEObjectMap(org.eclipse.emf.ecore.EObject eObject,
java.util.List<org.eclipse.emf.ecore.EObject> map)
|
static void |
fillIdToEObjectMap(org.eclipse.emf.ecore.resource.Resource resource,
java.util.List<org.eclipse.emf.ecore.EObject> map)
|
static byte[] |
getCompleteContent(java.io.InputStream inputStream)
|
static java.lang.String |
getCompleteContent(java.lang.String encoding,
java.io.InputStream inputStream)
|
static java.lang.String |
getCompleteContent(XtextResource xr)
|
static long |
milliDiff(long startLoad,
long doneLoad)
|
static int |
readInt(java.io.DataInputStream in,
boolean optimizePositive)
|
static java.lang.String |
readString(java.io.DataInputStream in)
|
static java.lang.String[] |
readStringArray(java.io.DataInputStream in)
|
static SyntaxErrorMessage |
readSyntaxErrorMessage(java.io.DataInputStream in,
DeserializationConversionContext context)
|
static void |
tryClose(java.io.Closeable stream,
org.apache.log4j.Logger logger)
|
static int |
writeInt(java.io.DataOutputStream out,
int value,
boolean optimizePositive)
|
static void |
writeString(java.io.DataOutputStream out,
java.lang.String s)
|
static void |
writeStringArray(java.io.DataOutputStream out,
java.lang.String[] ss)
|
static void |
writeSyntaxErrorMessage(java.io.DataOutputStream out,
SerializationConversionContext scc,
SyntaxErrorMessage syntaxErrorMessage)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KIB
public static final int KIB
- See Also:
- Constant Field Values
SerializationUtil
public SerializationUtil()
fillIdToEObjectMap
public static void fillIdToEObjectMap(org.eclipse.emf.ecore.resource.Resource resource,
java.util.List<org.eclipse.emf.ecore.EObject> map)
fillIdToEObjectMap
public static void fillIdToEObjectMap(org.eclipse.emf.ecore.EObject eObject,
java.util.List<org.eclipse.emf.ecore.EObject> map)
milliDiff
public static long milliDiff(long startLoad,
long doneLoad)
getCompleteContent
public static java.lang.String getCompleteContent(XtextResource xr)
throws java.io.IOException,
java.io.UnsupportedEncodingException
- Throws:
java.io.IOException
java.io.UnsupportedEncodingException
getCompleteContent
public static java.lang.String getCompleteContent(java.lang.String encoding,
java.io.InputStream inputStream)
throws java.io.UnsupportedEncodingException,
java.io.IOException
- Throws:
java.io.UnsupportedEncodingException
java.io.IOException
getCompleteContent
public static byte[] getCompleteContent(java.io.InputStream inputStream)
throws java.io.IOException
- Throws:
java.io.IOException
writeSyntaxErrorMessage
public static void writeSyntaxErrorMessage(java.io.DataOutputStream out,
SerializationConversionContext scc,
SyntaxErrorMessage syntaxErrorMessage)
throws java.io.IOException
- Throws:
java.io.IOException
readSyntaxErrorMessage
public static SyntaxErrorMessage readSyntaxErrorMessage(java.io.DataInputStream in,
DeserializationConversionContext context)
throws java.io.IOException
- Throws:
java.io.IOException
writeInt
public static int writeInt(java.io.DataOutputStream out,
int value,
boolean optimizePositive)
throws java.io.IOException
- Throws:
java.io.IOException
readInt
public static int readInt(java.io.DataInputStream in,
boolean optimizePositive)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public static final void writeString(java.io.DataOutputStream out,
java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
readString
public static final java.lang.String readString(java.io.DataInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
writeStringArray
public static void writeStringArray(java.io.DataOutputStream out,
java.lang.String[] ss)
throws java.io.IOException
- Throws:
java.io.IOException
readStringArray
public static java.lang.String[] readStringArray(java.io.DataInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
tryClose
public static void tryClose(java.io.Closeable stream,
org.apache.log4j.Logger logger)
throws java.io.IOException
- Throws:
java.io.IOException