Package com.google.gwt.dev.util

Examples of com.google.gwt.dev.util.StringInterningObjectInputStream


            bis = new BufferedInputStream(fis);
            /*
             * It is possible for the next call to throw an exception, leaving
             * inputStream null and fis still live.
             */
            inputStream = new StringInterningObjectInputStream(bis);
            while (true) {
              CachedCompilationUnit unit = (CachedCompilationUnit) inputStream.readObject();
              if (unit == null) {
                break;
              }
View Full Code Here


    try {
      Socket s = new Socket(options.getCompileHost(), options.getCompilePort());
      logger.log(TreeLogger.DEBUG, "Socket opened");

      ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream());
      ObjectInputStream in = new StringInterningObjectInputStream(s.getInputStream());

      // Write my cookie
      out.writeUTF(options.getCookie());
      out.flush();

      // Read the File that contains the serialized UnifiedAst
      File astFile = (File) in.readObject();
      ObjectInputStream astIn = new StringInterningObjectInputStream(new FileInputStream(
          astFile));
      UnifiedAst ast = (UnifiedAst) astIn.readObject();
      ast.prepare();
      logger.log(TreeLogger.SPAM, "Created new UnifiedAst instance");

      // Report on the amount of memory we think we're using
      long estimatedMemory = Runtime.getRuntime().totalMemory()
View Full Code Here

   * process.
   */
  public List<JDeclaredType> getTypes() {
    try {
      byte[] bytes = getTypesSerialized();
      ObjectInputStream ois = new StringInterningObjectInputStream(new ByteArrayInputStream(bytes));
      return JProgram.deserializeTypes(ois);
    } catch (IOException e) {
      throw new RuntimeException("Unexpected IOException on in-memory stream", e);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("Unexpected error deserializing AST for '" + getTypeName() + "'",
View Full Code Here

    return createFromStream(new FileInputStream(location));
  }

  public static CompilationUnitArchive createFromStream(InputStream stream) throws IOException,
      ClassNotFoundException {
    ObjectInputStream ois = new StringInterningObjectInputStream(new BufferedInputStream(stream));
    CompilationUnitArchive result = (CompilationUnitArchive) ois.readObject();
    ois.close();
    return result;
  }
View Full Code Here

      InputStream compilationErrorsIndexInputStream = getInputStream(compilationErrorsIndexEntry);

      CompilationErrorsIndexImpl newCompilationErrorsIndex;
      try {
        ObjectInputStream objectInputStream =
            new StringInterningObjectInputStream(compilationErrorsIndexInputStream);
        newCompilationErrorsIndex = (CompilationErrorsIndexImpl) objectInputStream.readObject();
        objectInputStream.close();
      } catch (IOException e) {
        throw new CompilerIoException(
            "Failed to read the compilation errors index for deserialization.", e);
      } catch (ClassNotFoundException e) {
        throw new CompilerIoException(
View Full Code Here

      InputStream compilationUnitInputStream = getInputStream(compilationUnitEntry);

      CompilationUnit compilationUnit;
      try {
        ObjectInputStream objectInputStream =
            new StringInterningObjectInputStream(compilationUnitInputStream);
        compilationUnit = (CompilationUnit) objectInputStream.readObject();
        objectInputStream.close();
      } catch (IOException e) {
        throw new CompilerIoException(
            "Failed to read compilation unit " + typeSourceName + " for deserialization.", e);
      } catch (ClassNotFoundException e) {
        throw new CompilerIoException("Failed to deserialize compilation unit " + typeSourceName
View Full Code Here

           * We've set SO_TIMEOUT, so this may fail if the remote process never
           * connects back.
           */
          workerSocket = serverSocket.accept();

          in = new StringInterningObjectInputStream(workerSocket.getInputStream());
          out = new ObjectOutputStream(workerSocket.getOutputStream());

          // Verify we're talking to the right worker
          String c = in.readUTF();
          if (!cookies.contains(c)) {
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.util.StringInterningObjectInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.