Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FSDataInputStream.readShort()


      /* file is empty, use TXT readerup */
      if (0 == is.available()) {
        return HdfsFileType.TXT;
      }

      switch (is.readShort()) {
      case 0x5345:
        if (is.readByte() == 'Q') {
          return HdfsFileType.SEQ;
        }
      default:
View Full Code Here


    @Override
    protected InputStream getInputStream(PathData item) throws IOException {
      FSDataInputStream i = (FSDataInputStream)super.getInputStream(item);

      // Check type of stream first
      switch(i.readShort()) {
        case 0x1f8b: { // RFC 1952
          // Must be gzip
          i.seek(0);
          return new GZIPInputStream(i);
        }
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.