Package java.io

Examples of java.io.DataOutputStream.writeChar()


    /* write the index (stage 1) array and the 16/32-bit data (stage 2) array */
    if (reduceTo16Bits) {
      /* write 16-bit index values shifted right by UTRIE_INDEX_SHIFT, after adding indexLength */
      for (int i = 0; i < m_indexLength_; i++) {
        int v = (m_index_[i] + m_indexLength_) >>> Trie.INDEX_STAGE_2_SHIFT_;
        dos.writeChar(v);
      }

      /* write 16-bit data values */
      for (int i = 0; i < m_dataLength_; i++) {
        int v = m_data_[i] & 0x0000ffff;
View Full Code Here


      }

      /* write 16-bit data values */
      for (int i = 0; i < m_dataLength_; i++) {
        int v = m_data_[i] & 0x0000ffff;
        dos.writeChar(v);
      }
    } else {
      /* write 16-bit index values shifted right by UTRIE_INDEX_SHIFT */
      for (int i = 0; i < m_indexLength_; i++) {
        int v = (m_index_[i]) >>> Trie.INDEX_STAGE_2_SHIFT_;
View Full Code Here

      }
    } else {
      /* write 16-bit index values shifted right by UTRIE_INDEX_SHIFT */
      for (int i = 0; i < m_indexLength_; i++) {
        int v = (m_index_[i]) >>> Trie.INDEX_STAGE_2_SHIFT_;
        dos.writeChar(v);
      }

      /* write 32-bit data values */
      for (int i = 0; i < m_dataLength_; i++) {
        dos.writeInt(m_data_[i]);
View Full Code Here

    } finally {
      dataXceiverServer.balanceThrottler.release();
      if (isOpSuccess) {
        try {
          // send one last byte to indicate that the resource is cleaned.
          reply.writeChar('d');
        } catch (IOException ignored) {
        }
      }
      IOUtils.closeStream(reply);
      IOUtils.closeStream(blockSender);
View Full Code Here

            // boolean
            out.writeBoolean(true);
            // byte
            out.writeByte(0x1);
            // char
            out.writeChar('a');
            // short
            out.writeShort(1);
            // int
            out.writeInt(1);
            // long
View Full Code Here

    } finally {
      dataXceiverServer.balanceThrottler.release();
      if (isOpSuccess) {
        try {
          // send one last byte to indicate that the resource is cleaned.
          reply.writeChar('d');
        } catch (IOException ignored) {
        }
      }
      IOUtils.closeStream(reply);
      IOUtils.closeStream(blockSender);
View Full Code Here

            // boolean
            dos.writeBoolean(true);
            // byte
            dos.writeByte(0x1);
            // char
            dos.writeChar('a');
            // short
            dos.writeShort(1);
            // int
            dos.writeInt(1);
            // long
View Full Code Here

    } finally {
      dataXceiverServer.balanceThrottler.release();
      if (isOpSuccess) {
        try {
          // send one last byte to indicate that the resource is cleaned.
          reply.writeChar('d');
        } catch (IOException ignored) {
        }
      }
      IOUtils.closeStream(reply);
      IOUtils.closeStream(blockSender);
View Full Code Here

        DataOutputStream dos = new DataOutputStream(os);
        int  bytesWritten = 0;
       
        bytesWritten += serializeHeader(dos);       
        for (int i=0; i<dataLength; i++) {
            dos.writeChar(index[data16+i]);
        }
        bytesWritten += dataLength*2;       
        return bytesWritten;
    }

View Full Code Here

    } finally {
      dataXceiverServer.balanceThrottler.release();
      if (isOpSuccess) {
        try {
          // send one last byte to indicate that the resource is cleaned.
          reply.writeChar('d');
        } catch (IOException ignored) {
        }
      }
      IOUtils.closeStream(reply);
      IOUtils.closeStream(blockSender);
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.