Examples of writeUTF()


Examples of java.io.DataOutputStream.writeUTF()

                    Object o = m.invoke(null);
                    out.writeUTF(o.toString());
                }
            } catch (Exception e) {
                // nanoTime not found, this is ok (only exists for JDK 1.5 and higher)
                out.writeUTF(e.toString());
            }

            // memory
            out.writeInt(new Object().hashCode());
            Runtime runtime = Runtime.getRuntime();
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

            out.writeLong(runtime.maxMemory());
            out.writeLong(runtime.totalMemory());

            // environment
            try {
                out.writeUTF(System.getProperties().toString());
            } catch (Exception e) {
                warn("generateAlternativeSeed", e);
            }

            // host name and ip addresses (if any)
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

            try {
                // workaround for the Google App Engine: don't use InetAddress
                Class<?> inetAddressClass = Class.forName("java.net.InetAddress");
                Object localHost = inetAddressClass.getMethod("getLocalHost").invoke(null);
                String hostName = inetAddressClass.getMethod("getHostName").invoke(localHost).toString();
                out.writeUTF(hostName);
                Object[] list = (Object[]) inetAddressClass.getMethod("getAllByName", String.class).invoke(null, hostName);
                Method getAddress = inetAddressClass.getMethod("getAddress");
                for (Object o : list) {
                    out.write((byte[]) getAddress.invoke(o));
                }
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

    DataOutputStream output = null;
    try {
      output = new DataOutputStream(new FileOutputStream(file));
      output.writeInt(character.id);
      output.writeUTF(character.otherStuff);
      output.writeInt(character.x);
      output.writeInt(character.y);
      return true;
    } catch (IOException ex) {
      ex.printStackTrace();
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

      try {
        out.write(MAGIC_NUMBER);
        out.writeByte(FILE_FORMAT_VERSION);

        for (Namespace ns : namespacesMap.values()) {
          out.writeUTF(ns.getName());
          out.writeUTF(ns.getPrefix());
        }
      }
      finally {
        out.close();
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

        out.write(MAGIC_NUMBER);
        out.writeByte(FILE_FORMAT_VERSION);

        for (Namespace ns : namespacesMap.values()) {
          out.writeUTF(ns.getName());
          out.writeUTF(ns.getPrefix());
        }
      }
      finally {
        out.close();
      }
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

        StringBuilder sb = new StringBuilder();
        sb.append(methodName);
        sb.append(methodDescriptor);
        try {
            das.writeUTF(sb.toString());
        } catch (IOException e) {
            throw new IllegalStateException("Cannot write data for method '" + methodName + "'.", e);
        }
        try {
            das.flush();
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

     
      if (hasStaticInitializer(cl)) {
        if (TRACE_UID) System.out.println("STATICINIT");
    dout.writeUTF("<clinit>");
    dout.writeInt(Modifier.STATIC);
    dout.writeUTF("()V");
      }

      Constructor[] cons = cl.getDeclaredConstructors();
      MemberSignature[] consSigs = new MemberSignature[cons.length];
      for (int i = 0; i < cons.length; i++) {
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

         Modifier.STATIC | Modifier.FINAL |
         Modifier.SYNCHRONIZED | Modifier.NATIVE |
         Modifier.ABSTRACT | Modifier.STRICT);
    if ((mods & Modifier.PRIVATE) == 0) {
      if (TRACE_UID) System.out.println("<init>" + sig.signature + " " + mods);
      dout.writeUTF("<init>");
        dout.writeInt(mods);
        dout.writeUTF(sig.signature.replace('/', '.'));
    }
      }
     
View Full Code Here

Examples of java.io.DataOutputStream.writeUTF()

         Modifier.ABSTRACT | Modifier.STRICT);
    if ((mods & Modifier.PRIVATE) == 0) {
      if (TRACE_UID) System.out.println("<init>" + sig.signature + " " + mods);
      dout.writeUTF("<init>");
        dout.writeInt(mods);
        dout.writeUTF(sig.signature.replace('/', '.'));
    }
      }
     
      MemberSignature[] methSigs = new MemberSignature[methods.length];
      for (int i = 0; i < methods.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.