· The read method of the underlying stream returns -1, indicating end-of-file, or
· The available method of the underlying stream returns zero, indicating that further input requests would block.
If the first read on the underlying stream returns -1 to indicate end-of-file then this method returns -1. Otherwise this method returns the number of bytes actually read.
Public String getContentEncoding()
Public long getDate()
Public long getExpiration()
Public long getLastModified()
检索临时MIME首部字段
上面所描述的过于固定也过于不灵活,我们有更动态的方法来获得MIME首部字段:
Public String getHeaderField(String name)
Name= Content-type;
Content-encoding;
Date;