2
FileInputStream中读出方法签名(是正确的术语?) -风格的FileInputStream的阅读方法
public int read(byte[] b) throws IOException
// Reads up to b.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
// Returns: the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
什么是有过这样的签名这样的优势 -
public byte[] read(int numberOfBytes) throws IOException
// Reads up to numberOfBytes bytes of data from this input stream into an array of bytes.
// Returns- an array of bytes read. Array is empty if there is no more data because the end of the file has been reached.
后面的一个更方便吗? – UnKnown 2016-03-29 09:01:44