setlocale设置成中文php无效,JDK8至JDK 11 常用API更新

1) Optional

新增:stream()ifPresentOrElse​(Consumer super T> action, Runnable emptyAction)or​(Supplier extends Optional extends T>> supplier)

版本: 9orElseThrow()

版本: 10isEmpty()

版本: 11

2) CompletableFuture

新增:completeOnTimeout​(T value, long timeout, TimeUnit unit)newIncompleteFuture()defaultExecutor()copy()minimalCompletionStage()completeAsync​(Supplier extends T> supplier, Executor executor)orTimeout​(long timeout, TimeUnit unit)delayedExecutor​(long delay, TimeUnit unit, Executor executor)delayedExecutor​(long delay, TimeUnit unit)completedStage​(U value)failedFuture​(Throwable ex)failedStage​(Throwable ex)

版本: 9

3) Stream

新增:takeWhile​(Predicate super T> predicate)dropWhile​(Predicate super T> predicate)ofNullable​(T t)iterate​(T seed, Predicate super T> hasNext, UnaryOperator next)

版本: 9

4) Map

新增:of() 系列方法entry​(K k, V v)

版本: 9copyOf​(Map extends K,​? extends V> map)

版本: 10

5) List

新增:of() 系列方法

版本: 9copyOf​(Collection extends E> coll)

版本: 10

6) Set

新增:of() 系列方法

版本: 9copyOf​(Collection extends E> coll)

版本: 10

7) LocalDate

新增:datesUntil​(LocalDate endExclusive)datesUntil​(LocalDate endExclusive, Period step)toEpochSecond​(LocalTime time, ZoneOffset offset)

版本: 9

8) Locale

新增:getISOCountries​(Locale.IsoCountryCode type)

版本: 9

9) String

新增:strip()stripLeading()stripTrailing()isBlank()lines()repeat​(int count)

版本: 11chars()codePoints()

版本: 9

10) HttpClient

新增类

版本: 11

11) InputStream

新增:nullInputStream()readNBytes​(int len) throws IOException

版本: 11readAllBytes() throws IOExceptionreadNBytes​(byte[] b, int off, int len) throws IOExceptiontransferTo​(OutputStream out) throws IOException

版本: 9

12) OutputStream

新增:nullOutputStream()

版本: 11

13) ByteArrayOutputStream

新增:writeBytes​(byte[] b)

版本: 11toString​(Charset charset)

版本: 10

14) Selector

新增:select​(Consumer action, long timeout) throws IOExceptionselect​(Consumer action) throws IOExceptionselectNow​(Consumer action) throws IOException

版本: 11

15) Objects

新增:requireNonNullElse​(T obj, T defaultObj)requireNonNullElseGet​(T obj, Supplier extends T> supplier)checkIndex​(int index, int length)checkFromToIndex​(int fromIndex, int toIndex, int length)checkFromIndexSize​(int fromIndex, int size, int length)

版本: 9

16) Path

新增:of​(String first, String... more)of​(URI uri)

版本: 11

17) Files

新增:readString​(Path path) throws IOExceptionreadString​(Path path, Charset cs) throws IOExceptionwriteString​(Path path, CharSequence csq, OpenOption... options) throws IOExceptionwriteString​(Path path, CharSequence csq, Charset cs, OpenOption... options) throws IOException

版本: 11

18) Socket

新增:setOption​(SocketOption name, T value) throws IOExceptiongetOption​(SocketOption name) throws IOExceptionsupportedOptions()

版本: 9

19) HttpURLConnection

新增:setAuthenticator​(Authenticator auth)

版本: 9

20) URLClassLoader

新增:URLClassLoader​(String name, URL[] urls, ClassLoader parent)URLClassLoader​(String name, URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)

版本: 9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值