由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - guessContentTypeFromStream(InputStream)总是返回null怎么办?
相关主题
怎么从键盘输入整数或float?求救求救 JSObject的getWindow为什么总是返回null呀~
Windows 下 Java console application 的问题Re: How can I call another program from Java?
JDK Source?请教一个问题,thanks!
eclipse help请问JSP/SERVLET和MYSQL如何实现照片上载和调用
Comparator Accessor method for SortedSet如何显示load文件的正确进程
这个方法到底如何调用的?How to write a file to the same directory of the class file?
Spring Library Bug?关于char和int的问题
a question on interface问个io的问题
相关话题的讨论汇总
话题: null话题: 返回话题: method
进入Java版参与讨论
1 (共1页)
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

1 (共1页)
进入Java版参与讨论
相关主题
问个io的问题Comparator Accessor method for SortedSet
InputStream.read() 被block的问题(陷入无限等待)这个方法到底如何调用的?
Process的问题Spring Library Bug?
Java练习题 7a question on interface
怎么从键盘输入整数或float?求救求救 JSObject的getWindow为什么总是返回null呀~
Windows 下 Java console application 的问题Re: How can I call another program from Java?
JDK Source?请教一个问题,thanks!
eclipse help请问JSP/SERVLET和MYSQL如何实现照片上载和调用
相关话题的讨论汇总
话题: null话题: 返回话题: method