G*O 发帖数: 706 | 1 用到这个方法的程序在java1.4上运行可以,在1.5上不行。
自己写一个又好麻烦。 |
m******t 发帖数: 2416 | 2
You know, if they were really confident on the method, they'd have named it
getContentTypeFromStream...
【在 G*O 的大作中提到】 : 用到这个方法的程序在java1.4上运行可以,在1.5上不行。 : 自己写一个又好麻烦。
|
c*****t 发帖数: 1879 | 3 BufferedInputStream?
【在 G*O 的大作中提到】 : 用到这个方法的程序在java1.4上运行可以,在1.5上不行。 : 自己写一个又好麻烦。
|
G*O 发帖数: 706 | 4 可是在1.4上运行的好好的。
google搜到几个bug报告竟然是2000年的,难道现在还没fix好?
it
【在 m******t 的大作中提到】 : : You know, if they were really confident on the method, they'd have named it : getContentTypeFromStream...
|
m******t 发帖数: 2416 | 5
Did you compare the implementations between 1.4 and 1.5?
I am not really familiar with the method, but I don't necessarily think it's
so much a bug as the natural uncertainty from the "guessing content type"
business. I mean, if you read the javadoc Jamse Gosling wrote for the first
version of this method (found on google), it's pretty interesting:
"This disgusting hack is used to check for files have some type that can be
determined by inspection. The bytes at the beginning of the file are
ex
【在 G*O 的大作中提到】 : 可是在1.4上运行的好好的。 : google搜到几个bug报告竟然是2000年的,难道现在还没fix好? : : it
|