Tests if a bag is compressed

@return True if this is a compressed bag.
172484
private function _isCompressed()
    {
        if (is_dir($this->bag)) {
            return false;
        } else {
            $bag = strtolower($this->bag);
            if (endsWith($bag, '.zip')) {
                $this->bagCompression = 'zip';
                return true;
            } else if (endsWith($bag, '.tar.gz') || endsWith($bag, '.tgz')) {
                $this->bagCompression = 'tgz';
                return true;
            }
        }
        return false;
    }
1242403
public static boolean isZipCode(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        String normalizedZip = stripCharsInBag(s, ZipCodeDelimiters);

        return (isInteger(normalizedZip) && ((normalizedZip.length() == digitsInZipCode1) || (normalizedZip.length() == digitsInZipCode2)));
    }
1219629
public boolean hasSamePackageOfSchema() {
		String packageName = getPackageName();
		String schemaPackageName = getParent().getPackageName();

		return packageName.equals(schemaPackageName);
	}
701342
protected Compress getCompress()
    {
        final Compress compress;
        if (this.store.getResourceProperties().containsKey(Store.PROPERTY_COMPRESS)) {
            compress = Compress.valueOf(this.store.getResourceProperties().get(Store.PROPERTY_COMPRESS).toUpperCase());
        } else {
            compress = Compress.NONE;
        }
        return compress;
    }
1238993
private boolean hasSameStructure() {
        Object wrappedCollection = getWrappedValue();
        if (wrappedCollection == null) {
            return bufferedListModel.size() == 0;
        }
        else if (wrappedCollection instanceof Object[]) {
            Object[] wrappedArray = (Object[])wrappedCollection;
            if (wrappedArray.length != bufferedListModel.size()) {
                return false;
            }
            for (int i = 0; i < bufferedListModel.size(); i++) {
                if(super.hasValueChanged(wrappedArray[i], bufferedListModel.get(i))) {
                    return false;
                }
            }
        }
        else {
            if (((Collection)wrappedCollection).size() != bufferedListModel.size()) {
                return false;
            }
            for (Iterator i = ((Collection)wrappedCollection).iterator(), j = bufferedListModel.iterator(); i.hasNext();) {
                if (super.hasValueChanged(i.next(), j.next())) {
                    return false;
                }
            }
        }
        return true;
    }
1121621
static boolean isZipDirectory(Key key) {
    Iced ice = DKV.getGet(key);
    if (ice == null) throw new H2OIllegalArgumentException("Missing data", "Did not find any data under " +
            "key " + key);
    ByteVec bv = (ByteVec) (ice instanceof ByteVec ? ice : ((Frame) ice).vecs()[0]);

    return isZipDirectory(bv);
  }
570153
@Override
    public boolean containsKey(T key) {
        try {
            if (emulateIsAbsent)
                lock.readLock().lock();

            return compressedEntries.containsKey(key);
        } finally {
            if (emulateIsAbsent)
                lock.readLock().unlock();
        }
    }
958914
public boolean isSuppressed(Symbol symbol) {
    SuppressWarnings suppression = ASTHelpers.getAnnotation(symbol, SuppressWarnings.class);
    return suppression != null
        && !Collections.disjoint(Arrays.asList(suppression.value()), allNames());
  }
36165
@Override
	public boolean isCacheable() {
		boolean supportsConditionals = has("Last-Modified", this.response) || has("ETag", this.response);
		boolean isCacheable =
				has("Cache-Control", "s-maxage", this.response)
				|| has("Cache-Control", "max-age", this.response)
				|| has("Expires", this.response);
		return supportsConditionals || isCacheable;
	}
61606
public boolean isBoxedPrimitive() {
    return this.equals(BOXED_BOOLEAN)
        || this.equals(BOXED_BYTE)
        || this.equals(BOXED_SHORT)
        || this.equals(BOXED_INT)
        || this.equals(BOXED_LONG)
        || this.equals(BOXED_CHAR)
        || this.equals(BOXED_FLOAT)
        || this.equals(BOXED_DOUBLE);
  }
1366695
protected function compress(){
		switch($this->compress){
			case self::COMPRESS_GZIP:
				$this->payload = gzdeflate($this->payload);
				break;
			case self::COMPRESS_BZIP:
				$this->payload = bzcompress($this->payload);
				break;
			case self::COMPRESS_LZF:
				$this->payload = lzf_compress($this->payload);
				break;
			case self::COMPRESS_OFF:
			default:
				//anything but known values result in OFF
				break;
		}
		return true;
	}
1306137
public boolean isFlat() {
    boolean flat = true;
    for (int ci = 0; ci < this.parts.size(); ci++) {
      flat &= this.parts.get(ci).isPosTag();
    }
    return flat;
  }
716651
public synchronized boolean hasNext()
    {
        if (position < length)
        {
            if (position < scrolled)
            {
             	return true;
            }
            else
            {
                boolean result = ojbIterator.hasNext();
             	return result;
            }
        }
        else
        {
			releaseJdbcResources();
            return false;
        }

    }
1271511
public static boolean isCompressed(PushbackInputStream pushbackInputStream) throws IOException {
      if (pushbackInputStream == null) {
         return false;
      }
      byte[] buffer = new byte[2];
      int read = pushbackInputStream.read(buffer);
      boolean isCompressed = false;

      if (read == 2) {
         isCompressed = ((buffer[0] == (byte) (GZIPInputStream.GZIP_MAGIC)) && (buffer[1] == (byte) (GZIPInputStream.GZIP_MAGIC >> 8)));
      }

      if (read != -1) {
         pushbackInputStream.unread(buffer, 0, read);
      }

      return isCompressed;
   }
387650
public boolean hasNext() {
		if(cachedNext != null) return true;
		while(itr.hasNext()) {
			S o = itr.next();
			T adapted = adapter.adapt(o);
			if(adapted != null) {
				cachedNext = adapted;
				return true;
			}
		}
		return false;
	}
476843
@Override
	public void bag(Date unBaggedObject)
	{
		if(unBaggedObject == null)
			this.time = 0;
		else
			this.time = unBaggedObject.getTime();
		
	}
1250933
public boolean isCached()
    {
        try {
            Record record = this.getOwner();
            Object objKey = record.getHandle(DBConstants.OBJECT_ID_HANDLE);
            return (m_hsCache.contains(objKey)); // True if cache value exists
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        return false;   // Never
    }