Limit the length of the FileInputStream.