Class SerializationUtil
- java.lang.Object
-
- org.eclipse.xtext.nodemodel.serialization.SerializationUtil
-
public class SerializationUtil extends java.lang.Object- Since:
- 2.3
- Noextend:
- This class is not intended to be subclassed by clients.
- Noinstantiate:
- This class is not intended to be instantiated by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static intKIB
-
Constructor Summary
Constructors Constructor Description SerializationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfillIdToEObjectMap(org.eclipse.emf.ecore.EObject eObject, java.util.List<org.eclipse.emf.ecore.EObject> map)static voidfillIdToEObjectMap(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.StringgetCompleteContent(java.lang.String encoding, java.io.InputStream inputStream)static java.lang.StringgetCompleteContent(XtextResource xr)static longmilliDiff(long startLoad, long doneLoad)static intreadInt(java.io.DataInputStream in, boolean optimizePositive)static java.lang.StringreadString(java.io.DataInputStream in)static java.lang.String[]readStringArray(java.io.DataInputStream in)static SyntaxErrorMessagereadSyntaxErrorMessage(java.io.DataInputStream in, DeserializationConversionContext context)static voidtryClose(java.io.Closeable stream, org.apache.log4j.Logger logger)static intwriteInt(java.io.DataOutputStream out, int value, boolean optimizePositive)static voidwriteString(java.io.DataOutputStream out, java.lang.String s)static voidwriteStringArray(java.io.DataOutputStream out, java.lang.String[] ss)static voidwriteSyntaxErrorMessage(java.io.DataOutputStream out, SerializationConversionContext scc, SyntaxErrorMessage syntaxErrorMessage)
-
-
-
Field Detail
-
KIB
public static final int KIB
- See Also:
- Constant Field Values
-
-
Method Detail
-
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.IOExceptionjava.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.UnsupportedEncodingExceptionjava.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
-
-