Package java.io

Examples of java.io.DataOutputStream.writeBoolean()


                    writeOut.writeInt( attributeName.length );
                    writeOut.write( attributeName );
                    if ( values[i].isString() )
                    {
                        byte[] value = values[i].getStringValue().getBytes( "UTF-8" ); //$NON-NLS-1$
                        writeOut.writeBoolean( true );
                        writeOut.writeInt( value.length );
                        writeOut.write( value );
                    }
                    else if ( values[i].isBinary() )
                    {
View Full Code Here


                        writeOut.write( value );
                    }
                    else if ( values[i].isBinary() )
                    {
                        byte[] value = values[i].getBinaryValue();
                        writeOut.writeBoolean( false );
                        writeOut.writeInt( value.length );
                        writeOut.write( value );
                    }
                }
View Full Code Here

        getSharedEditsFile(confg).getParentFile(), FAILOVER_SNAPSHOT_FILE);
    DataOutputStream out = new DataOutputStream(
        new BufferedOutputStream(new FileOutputStream(snapshotFile)))
    try {
      snapshot.write(out);
      out.writeBoolean(enableTestFrameworkFsck);
      if (enableTestFrameworkFsck) {
        Text.writeString(out, fsck);
      }
    } finally {
      out.close();
View Full Code Here

      out.writeLong(block.getBlockId());
      out.writeLong(block.getGenerationStamp());
      out.writeInt(0);           // no pipelining
      out.writeBoolean(false);   // not part of recovery
      Text.writeString(out, ""); // client
      out.writeBoolean(true); // sending src node information
      DatanodeInfo srcNode = new DatanodeInfo();
      srcNode.write(out); // Write src node DatanodeInfo
      // write targets
      out.writeInt(0); // num targets
      // send data & checksum
View Full Code Here

        out.writeInt(namespaceId);
      }
      out.writeLong(block.getBlockId());
      out.writeLong(block.getGenerationStamp());
      out.writeInt(0);           // no pipelining
      out.writeBoolean(false);   // not part of recovery
      Text.writeString(out, ""); // client
      out.writeBoolean(true); // sending src node information
      DatanodeInfo srcNode = new DatanodeInfo();
      srcNode.write(out); // Write src node DatanodeInfo
      // write targets
View Full Code Here

            String gname;

            DataOutputStream output = null;
            try {
                output=new DataOutputStream(sock.getOutputStream());
                output.writeBoolean(true);
            }
            catch(IOException e1) {
                try {
                    output.writeBoolean(false);
                }
View Full Code Here

                output=new DataOutputStream(sock.getOutputStream());
                output.writeBoolean(true);
            }
            catch(IOException e1) {
                try {
                    output.writeBoolean(false);
                }
                catch(IOException e) {}
            }

            while(active) {
View Full Code Here

    public static void send(BrowserChannel channel, boolean isException,
        Value returnValue) throws IOException {
      final DataOutputStream stream = channel.getStreamToOtherSide();
      stream.writeByte(MessageType.RETURN.getId());
      stream.writeBoolean(isException);
      channel.writeValue(stream, returnValue);
      stream.flush();
    }

    public static void send(BrowserChannel channel,
View Full Code Here

   */
  DataOutputStream writeHeaderAndWrapStream(OutputStream os)
  throws IOException {
    DataOutputStream dos = new DataOutputStream(os);

    dos.writeBoolean(imageCodec != null);

    if (imageCodec != null) {
      String codecClassName = imageCodec.getClass().getCanonicalName();
      Text.writeString(dos, codecClassName);

View Full Code Here

            String gname;

            DataOutputStream output = null;
            try {
                output=new DataOutputStream(sock.getOutputStream());
                output.writeBoolean(true);
            }
            catch(IOException e1) {
                try {
                    output.writeBoolean(false);
                }
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.