Package java.io

Examples of java.io.DataInputStream.readInt()


          Object result = null;
          if ( DEBUG ) LOGGER.debug( "Called content(" + field + "); nextField:" + nextFieldToRead );
          try {
            skipToField( field );
            if ( fieldType( nextFieldToRead ) == FieldType.VIRTUAL ) {
              final int nfrag = rawContentDataInputStream.readInt();
              MutableString doc = new MutableString();
              MutableString text = new MutableString();
              VirtualDocumentFragment[] fragArray = new VirtualDocumentFragment[ nfrag ];
              for ( int i = 0; i < nfrag; i++ ) {
                doc.readSelfDelimUTF8( rawContent );
View Full Code Here


            len = documentsInputBitStream.readDelta();
            if ( exact ) len *= 2;
            documentsInputBitStream.skipDeltas( len );
            break;
          case VIRTUAL:
            final int nfrag = nonTextDataInputStream.readInt();
            for ( int i = 0; i < 2 * nfrag; i++ ) MutableString.skipSelfDelimUTF8( nonTextDataInputStream );
            break;
          default:
            try { new ObjectInputStream( nonTextDataInputStream ).readObject(); } catch ( ClassNotFoundException e ) { throw new RuntimeException( e ); }
          }
View Full Code Here

            }
            else fieldContent.append( ' ');
          }
          return new FastBufferedReader( fieldContent );
        case VIRTUAL:
          final int nfrag = nonTextDataInputStream.readInt();
          MutableString doc = new MutableString();
          MutableString text = new MutableString();
          VirtualDocumentFragment[] fragArray = new VirtualDocumentFragment[ nfrag ];
          for ( int i = 0; i < nfrag; i++ ) {
            doc.readSelfDelimUTF8( (InputStream)nonTextDataInputStream );
View Full Code Here

       
          dos.write( beacon_out );       
           
          DataInputStream dis = new DataInputStream( socket.getInputStream());
         
          int len = dis.readInt();
       
          if ( len < 65536 ){
           
            byte[] bytes = new byte[len];
 
View Full Code Here

    File file = new File("characters", name.toLowerCase());
    DataInputStream input = null;
    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();
View Full Code Here

      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) {
      ex.printStackTrace();
View Full Code Here

      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) {
      ex.printStackTrace();
      return null;
View Full Code Here

                return;
            }
            Value v = readValue(page);
            DataInputStream in = new DataInputStream(v.getInputStream());
            for(int i = 0; i < tupleCount; i++) {
                int len = in.readInt();
                byte[] tuple = new byte[len];
                in.read(tuple);
                tuples.add(tuple);
            }
            if(in.available() > 0) {
View Full Code Here

                // Read in the Values
                Value prevKey = null;
                final int keyslen = ph.getValueCount();
                keys = new Value[keyslen];
                for(int i = 0; i < keyslen; i++) {
                    final int valSize = in.readInt();
                    if(valSize == -1) {
                        prevKey.incrRefCount();
                        keys[i] = prevKey;
                    } else {
                        byte[] b = new byte[pfxLen + valSize];
View Full Code Here

      try {
        DataInputStream dis = new DataInputStream(socket.getInputStream());
        DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
       
        while(true) {
          int num = dis.readInt();
         
          dos.writeInt(num + 1);
        }
       
       
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.