Package java.io

Examples of java.io.DataInputStream.readInt()


        this.flags = stream.readUnsignedShort();

        this.length = stream.readUnsignedShort();

        this.ssrc = stream.readInt() & RTPHeader.UINT_TO_LONG_CONVERT;

       

        if (getVersion() != VERSION) {
View Full Code Here


                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;
                    } else {
                        String recipientAlias = din.readUTF();
                        String realmName = din.readUTF();
View Full Code Here

                        recipientList.add(recipient);
                    }
                }
                Properties parameters = new Properties();
                while (true) {
                    int parameterType = din.readInt();
                    if (parameterType < 1) {
                        break;
                    } else {
                        String key = din.readUTF();
                        String val = din.readUTF();
View Full Code Here

        long p;
        int l;
        while (true) {
            try {
                p = is.readLong();
                l = is.readInt();
                this.put(Long.valueOf(p), Integer.valueOf(l));
            } catch (IOException e) {
                break;
            }
        }
View Full Code Here

     */
    void processQuery(InputStream inStream) {

        try {
            DataInputStream dataIn     = new DataInputStream(inStream);
            int             databaseID = dataIn.readInt();
            long            sessionID  = dataIn.readLong();
            int             mode       = dataIn.readByte();
            Session session = DatabaseManager.getSession(databaseID,
                sessionID);
            Result resultIn = Result.newResult(session, mode, dataIn, rowIn);
View Full Code Here

                // fredt@users - the servlet container, Resin does not return all
                // the bytes with one call to input.read(b,0,len) when len > 8192
                // bytes, the loop in the Result.read() method handles this
                inStream = new DataInputStream(request.getInputStream());

                int  databaseID = inStream.readInt();
                long sessionID  = inStream.readLong();
                int  mode       = inStream.readByte();
                Session session = DatabaseManager.getSession(databaseID,
                    sessionID);
                Result resultIn = Result.newResult(session, mode, inStream,
View Full Code Here

        new ByteArrayInputStream(bdata));
    for (int ic = 0; ic < items.length; ic++) {
      try {
        final Item item = items[ic];
        if (item instanceof ChoiceGroup) {
          ((ChoiceGroup)item).setSelectedIndex(dis.readInt(),
            true);
          //#ifdef DLOGGING
          if (finestLoggable) {logger.finest("set selected " + ((ChoiceGroup)item).getSelectedIndex());}
          //#endif
        } else if (item instanceof TextField) {
View Full Code Here

            true);
          //#ifdef DLOGGING
          if (finestLoggable) {logger.finest("set selected " + ((ChoiceGroup)item).getSelectedIndex());}
          //#endif
        } else if (item instanceof TextField) {
          final int len = dis.readInt();
          byte [] bvalue = new byte[len];
          dis.read(bvalue);
          String value;
          try {
            value = new String(bvalue, "UTF-8");
View Full Code Here

          System.out.println("currentSettings,data.length=" + currentSettings + "," + ((data == null) ? "null" : Integer.toString(data.length)));
          //#endif
          if( data != null ) {
            bin = new ByteArrayInputStream( data );
            din = new DataInputStream( bin );
            int num = din.readInt();
            while( num-- > 0 ) {
              String name = din.readUTF();
              //#ifdef DLOGGING
              if (finestLoggable) {logger.finest("name=" + name);}
              //#endif
View Full Code Here

              //#ifdef DLOGGING
              if (finestLoggable) {logger.finest("name=" + name);}
              //#endif
              String value;
              if (currentSettings) {
                final int blen = din.readInt();
                byte [] bvalue = new byte[blen];
                final int alen = din.read(bvalue);
                if (alen <= 0) {
                  value = "";
                } else {
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.