在Java 8中,是否有一个ByteStream类?

前端之家收集整理的这篇文章主要介绍了在Java 8中,是否有一个ByteStream类?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Java 8提供Stream< T> double,int和long的专长:DoubleStream,IntStream和LongStream.但是,我在 the documentation中找不到等效的字节.

Java 8提供了一个ByteStream类?

解决方法

不,它不存在.实际上,它没有被明确地被实现,所以不能为每个原始类型的吨级集群Stream API.

从Brian Goetz在OpenJDK邮件列表中引用a mail

Short answer: no.

It is not worth another 100K+ of JDK footprint each for these forms
which are used almost never. And if we added those,someone would
demand short,float,or boolean.

Put another way,if people insisted we had all the primitive specializations,we would have no primitive specializations. Which would be worse than the status quo.

原文链接:https://www.f2er.com/java/124693.html

猜你在找的Java相关文章