Package java.io

Examples of java.io.DataOutputStream.writeChar()


                        if (ref !=0) {
                            //update the ref         
                            refheap[i+StringHeap.CHAR_HEAP_POINTER_OFFSET] = pos;
                            //write out the chars in the string
                            dos.writeChars((String)cas.getStringHeap().stringList.get(ref));
                            dos.writeChar(0); // null terminate each string
                            //update pos
                            pos += 1 + ((String) cas.getStringHeap().stringList.get(ref)).length();
                        }       
                    }
                }
View Full Code Here


                    }
                }

                //word alignment
                if (stringTotalLength % != 0) {
                    dos.writeChar(0);
                }
      }

      // write out the string ref heap
      // each reference consist of a offset into stringheap and a length
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

    } 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

        for (int i=0;i<liste.size();i++)
        {
          SFileDescriptor dt = (SFileDescriptor)liste.get(i);
        
          dos.writeByte(dt.filename.length());
          for (int j=0;j<dt.filename.length();j++) dos.writeChar(dt.filename.charAt(j));
          
          dos.writeLong(dt.position);
          dos.writeLong(dt.size);
        }
       
View Full Code Here

          dos.writeChars(String.valueOf(shdh.charHeap, 0, shdh.charHeapPos));
        } else {
          // no stringheap data
          // if there is data in the string lists, write a leading 0
          if (stringListLength > 0) {
            dos.writeChar(0);
          }
        }

        // word alignment
        if (stringTotalLength % 2 != 0) {
View Full Code Here

          }
        }

        // word alignment
        if (stringTotalLength % 2 != 0) {
          dos.writeChar(0);
        }
      }

      // write out the string ref heap
      // each reference consist of a offset into stringheap and a length
View Full Code Here

          dos.writeChars(String.valueOf(shdh.charHeap, 0, shdh.charHeapPos));
        } else {
          // no stringheap data
          // if there is data in the string lists, write a leading 0
          if (stringListLength > 0) {
            dos.writeChar(0);
          }
        }

        // word alignment
        if (stringTotalLength % 2 != 0) {
View Full Code Here

          }
        }

        // word alignment
        if (stringTotalLength % 2 != 0) {
          dos.writeChar(0);
        }
      }

      // write out the string ref heap
      // each reference consist of a offset into stringheap and a length
View Full Code Here

        //
  dos.writeInt(letterIndex.size());
  for (Iterator i = letterIndex.keySet().iterator(); i.hasNext(); ) {
      String letter = (String) i.next();
      int index = ((Integer) letterIndex.get(letter)).intValue();
      dos.writeChar(letter.charAt(0));
      dos.writeInt(index);
  }

  // statemachine states
        //
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.