Package java.io

Examples of java.io.DataOutputStream.writeUTF()


             * 3. The name of each interface sorted by name written using UTF
             * encoding.
             */
            Arrays.sort(interfaces);
            for (int i = 0; i < interfaces.length; i++) {
                dos.writeUTF(interfaces[i].replace('/', '.'));
            }

            /*
             * 4. For each field of the class sorted by field name (except
             * private static and private transient fields):
View Full Code Here


             * the method, java.lang.reflect.Modifier.STATIC, written as a
             * 32-bit integer. 3. The descriptor of the method, ()V, in UTF
             * encoding.
             */
            if (hasStaticInitializer) {
                dos.writeUTF("<clinit>");
                dos.writeInt(Opcodes.ACC_STATIC);
                dos.writeUTF("()V");
            } // if..

            /*
 
View Full Code Here

             * encoding.
             */
            if (hasStaticInitializer) {
                dos.writeUTF("<clinit>");
                dos.writeInt(Opcodes.ACC_STATIC);
                dos.writeUTF("()V");
            } // if..

            /*
             * 6. For each non-private constructor sorted by method name and
             * signature: 1. The name of the method, <init>, in UTF encoding. 2.
View Full Code Here

   {
      long hash = 0;
      ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(512);
      MessageDigest messagedigest = MessageDigest.getInstance("SHA");
      DataOutputStream dataoutputstream = new DataOutputStream(new DigestOutputStream(bytearrayoutputstream, messagedigest));
      dataoutputstream.writeUTF(methodDesc);
      dataoutputstream.flush();
      byte abyte0[] = messagedigest.digest();
      for (int j = 0; j < Math.min(8, abyte0.length); j++)
         hash += (long) (abyte0[j] & 0xff) << j * 8;
      return hash;
View Full Code Here

    URLConnection c = getConnection(url);
   
    // open a stream which can write to the url
    DataOutputStream dstream = new DataOutputStream(c.getOutputStream());

    dstream.writeUTF("ServletCall");
    dstream.flush();
    dstream.close();
   
     // read the output from the URL
    DataInputStream in = new DataInputStream(new BufferedInputStream(c.getInputStream()));
View Full Code Here

    URLConnection c = getConnection(url);
   
    // open a stream which can write to the url
    DataOutputStream dstream = new DataOutputStream(c.getOutputStream());

    dstream.writeUTF("ServletCall");
    dstream.flush();
    dstream.close();
   
     // read the output from the URL
    DataInputStream in = new DataInputStream(new BufferedInputStream(c.getInputStream()));
View Full Code Here

          String name = (String) e.nextElement();
          String value = cproperties.get( name ).toString();
          //#ifdef DLOGGING
          if (finestLoggable) {logger.finest("name=" + name);}
          //#endif
          dout.writeUTF( name );
          byte[] bvalue;
          try {
            bvalue = value.getBytes("UTF-8");

          } catch (UnsupportedEncodingException uee) {
View Full Code Here

      out.writeInt(this.externalTimeStamps.size());
      Iterator entries = this.externalTimeStamps.entrySet().iterator();
      while (entries.hasNext()) {
        Map.Entry entry = (Map.Entry) entries.next();
        IPath key = (IPath) entry.getKey();
        out.writeUTF(key.toPortableString());
        Long timestamp = (Long) entry.getValue();
        out.writeLong(timestamp.longValue());
      }
    } catch (IOException e) {
      IStatus status = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, IStatus.ERROR, "Problems while saving timestamps", e); //$NON-NLS-1$
View Full Code Here

          String name = (String) e.nextElement();
          String value = cproperties.get( name ).toString();
          //#ifdef DLOGGING
//@          if (finestLoggable) {logger.finest("name=" + name);}
          //#endif
          dout.writeUTF( name );
          byte[] bvalue;
          try {
            bvalue = value.getBytes("UTF-8");

          } catch (UnsupportedEncodingException uee) {
View Full Code Here

                if (fds.length > 1)
                    java.util.Arrays.sort(fds, compareByName);

                for (int i = 0; i < fds.length; i++) {
                    FieldDescriptor f = fds[i];
                    out.writeUTF(f.getJavaName());
                    out.writeUTF(makeSignature(f.getType()));
                }

                /*
                 * Field[] fields = type.getDeclaredFields ();
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.