Package java.io

Examples of java.io.DataOutputStream.writeChar()


        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 2048; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here


        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(22222);
        for(int times = 0; times < 10; times++) {
            for(int i = 0; i < 4096; i++) {
                data.writeChar(rand.nextInt());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

      while (iterA.hasNext())
        outStream.writeShort(iterA.getShortNext());

    } else if (classType == char.class) {
      while (iterA.hasNext())
        outStream.writeChar(iterA.getCharNext());

    } else if (classType == byte.class) {
      while (iterA.hasNext())
        outStream.writeByte(iterA.getByteNext());
View Full Code Here

     *         space data from the file
     */
    static void writeHeader(OutputStream os, SSpaceFormat format)
            throws IOException {
        DataOutputStream dos = new DataOutputStream(os);
        dos.writeChar('s');
        dos.writeChar('0' + format.ordinal());
    }

    /**
     * Writes the semantic space to the file using the {@code TEXT} format.
View Full Code Here

     */
    static void writeHeader(OutputStream os, SSpaceFormat format)
            throws IOException {
        DataOutputStream dos = new DataOutputStream(os);
        dos.writeChar('s');
        dos.writeChar('0' + format.ordinal());
    }

    /**
     * Writes the semantic space to the file using the {@code TEXT} format.
     *
 
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

    } 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

                }
                else {
                    // no stringheap data
                    //if there is data in the string lists, write a leading 0
                    if ( stringListLength > 0 ) {
                        dos.writeChar(0);
                    }
                }
       
                //write out the data in the StringList and update the
                //reference in the local ref heap.
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.