Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.DataOutputBuffer.writeByte()


        dob.writeByte(1);
        dob.writeByte(5);
        break;
      case LZO1X_15:
        dob.writeByte(2);
        dob.writeByte(1);
        break;
      case LZO1X_999:
        dob.writeByte(3);
        dob.writeByte(9);
        break;
View Full Code Here


      case LZO1X_15:
        dob.writeByte(2);
        dob.writeByte(1);
        break;
      case LZO1X_999:
        dob.writeByte(3);
        dob.writeByte(9);
        break;
      default:
        throw new IOException("Incompatible lzop strategy: " + strategy);
      }
View Full Code Here

        dob.writeByte(2);
        dob.writeByte(1);
        break;
      case LZO1X_999:
        dob.writeByte(3);
        dob.writeByte(9);
        break;
      default:
        throw new IOException("Incompatible lzop strategy: " + strategy);
      }
      dob.writeInt(0);                                    // all flags 0
View Full Code Here

      }
      dob.writeInt(0);                                    // all flags 0
      dob.writeInt(0x81A4);                               // mode
      dob.writeInt((int)(System.currentTimeMillis() / 1000)); // mtime
      dob.writeInt(0);                                    // gmtdiff ignored
      dob.writeByte(0);                                   // no filename
      Adler32 headerChecksum = new Adler32();
      headerChecksum.update(dob.getData(), 0, dob.getLength());
      int hc = (int)headerChecksum.getValue();
      dob.writeInt(hc);
      out.write(LzopCodec.LZO_MAGIC);
View Full Code Here

            dob.writeShort(LzoVersion.LZO_LIBRARY_VERSION);
            dob.writeShort(LzopConstants.LZOP_COMPAT_VERSION);
            switch (getAlgorithm()) {
                case LZO1X:
                    // case LZO1X_1:
                    dob.writeByte(LzopConstants.M_LZO1X_1);
                    dob.writeByte(5);
                    break;
                /*
                case LZO1X_15:
                dob.writeByte(LzopConstants.M_LZO1X_1_15);
View Full Code Here

            dob.writeShort(LzopConstants.LZOP_COMPAT_VERSION);
            switch (getAlgorithm()) {
                case LZO1X:
                    // case LZO1X_1:
                    dob.writeByte(LzopConstants.M_LZO1X_1);
                    dob.writeByte(5);
                    break;
                /*
                case LZO1X_15:
                dob.writeByte(LzopConstants.M_LZO1X_1_15);
                dob.writeByte(1);
View Full Code Here

            mask = mask | LzopConstants.F_CRC32_C | LzopConstants.F_CRC32_D;
            dob.writeInt((int) (flags & mask & 0xFFFFFFFF)); // all flags 0
            dob.writeInt(33188); // mode
            dob.writeInt((int) (System.currentTimeMillis() / 1000)); // mtime
            dob.writeInt(0); // gmtdiff ignored
            dob.writeByte(0); // no filename
            Adler32 headerChecksum = new Adler32();
            headerChecksum.update(dob.getData(), 0, dob.getLength());
            int hc = (int) headerChecksum.getValue();
            dob.writeInt(hc);
            out.write(LzopConstants.LZOP_MAGIC);
View Full Code Here

        try {
            outBuffer.reset();

            outBuffer.writeUTF(payload.getApp());
            outBuffer.writeInt(payload.getNumMessages());
            outBuffer.writeByte(payload.getCompression());
            outBuffer.writeLong(payload.getCrc());
            outBuffer.writeInt(payload.getMessages().length);
            outBuffer.write(payload.getMessages());

            return ByteBuffer.wrap(outBuffer.getData(), 0, outBuffer.getLength()).array();
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.