public String getETag() throws IOException { return getHeader(ETAG); }
public void setIfNoneMatch(String eTag) { setHeader(IF_NONE_MATCH, eTag); } }
public boolean getAcceptByteRanges() throws IOException { return "bytes".equals(getHeader(ACCEPT_RANGES)); }
public void setIfModifiedSince(long modifiedSince) { String ifModifiedSince = formatDate(modifiedSince); setHeader(IF_MODIFIED_SINCE, ifModifiedSince); }
public Long getLastModified() throws IOException { String lastModified = getHeader(LAST_MODIFIED); if(lastModified == null) return null; try { Calendar calendar = parseDate(lastModified); return calendar.getTimeInMillis(); } catch (ParseException e) { throw new IOException("Cannot parse last modified: " + lastModified, e); } }
public Long getContentLength() throws IOException { return parseLong(getHeader(CONTENT_LENGTH)); }