Package java.io

Examples of java.io.DataInputStream.readUTF()


        File tfc = new File(dir, "TFC");
        if (tfc.exists()) {
          DataInputStream dis = null;
          try {
            dis = new DataInputStream(new FileInputStream(tfc));
            String tname = dis.readUTF();
            Class tclass = Class.forName(tname);
            transaction = (Transaction) tclass.newInstance();
          } catch (Exception exc) {
            logmon.log(BasicLevel.FATAL, getName() + ", can't instantiate transaction manager", exc);
            throw new Exception("Can't instantiate transaction manager");
View Full Code Here


    try {
      input = new DataInputStream(new FileInputStream(file));
      Character character = new Character();
      character.id = input.readInt();
      character.name = name;
      character.otherStuff = input.readUTF();
      character.x = input.readInt();
      character.y = input.readInt();
      input.close();
      return character;
    } catch (IOException ex) {
View Full Code Here

          throw new IOException("Unable to read namespace file; invalid file format version: " + version);
        }

        while (true) {
          try {
            String name = in.readUTF();
            String prefix = in.readUTF();

            NamespaceImpl ns = new NamespaceImpl(prefix, name);
            namespacesMap.put(prefix, ns);
          }
View Full Code Here

        }

        while (true) {
          try {
            String name = in.readUTF();
            String prefix = in.readUTF();

            NamespaceImpl ns = new NamespaceImpl(prefix, name);
            namespacesMap.put(prefix, ns);
          }
          catch (EOFException e) {
View Full Code Here

        try {
          ByteArrayInputStream bais = new ByteArrayInputStream(data);
          DataInputStream is = new DataInputStream(bais);

          is.readLong();
          String logString = is.readUTF();
          logContent.append(logString + "\n");

          is.close();
          bais.close();
        } catch (IOException e) {
View Full Code Here

        for (int i = 0; i < f.length; i++) {
            FileInputStream fin = new FileInputStream(f[i]);
            try {
                DataInputStream din = new DataInputStream(fin);
                long id = din.readLong();
                String sinkName = din.readUTF();
                messageId = Math.max(id, messageId);
                boolean urgent = din.readBoolean();
                String subject = din.readUTF();
                List<Recipient> recipientList = new ArrayList<Recipient>();
                while (true) {
View Full Code Here

                DataInputStream din = new DataInputStream(fin);
                long id = din.readLong();
                String sinkName = din.readUTF();
                messageId = Math.max(id, messageId);
                boolean urgent = din.readBoolean();
                String subject = din.readUTF();
                List<Recipient> recipientList = new ArrayList<Recipient>();
                while (true) {
                    int recipientType = din.readInt();
                    if (recipientType == Recipient.EOF) {
                        break;
View Full Code Here

                while (true) {
                    int recipientType = din.readInt();
                    if (recipientType == Recipient.EOF) {
                        break;
                    } else {
                        String recipientAlias = din.readUTF();
                        String realmName = din.readUTF();
                        Recipient recipient = new Recipient(recipientType, recipientAlias, realmName);
                        recipientList.add(recipient);
                    }
                }
View Full Code Here

                    int recipientType = din.readInt();
                    if (recipientType == Recipient.EOF) {
                        break;
                    } else {
                        String recipientAlias = din.readUTF();
                        String realmName = din.readUTF();
                        Recipient recipient = new Recipient(recipientType, recipientAlias, realmName);
                        recipientList.add(recipient);
                    }
                }
                Properties parameters = new Properties();
View Full Code Here

                while (true) {
                    int parameterType = din.readInt();
                    if (parameterType < 1) {
                        break;
                    } else {
                        String key = din.readUTF();
                        String val = din.readUTF();
                        parameters.setProperty(key, val);
                    }
                }
                String content = din.readUTF();
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.