Class 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.
    • Constructor Detail

      • SerializationUtil

        public SerializationUtil()
    • 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.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
      • 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