w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
possible to construct java String from invalid code points?

You can use the CharsetEncoder and CharsetDecoder classes in java.nio.charset to achieve precise control over how characters and bytes are translated back and forth. In particular, CharsetDecoder.onMalformedInput() and CharsetDecoder.onUnmappableCharacter() let you define how those conditions should be handled. (The behaviour of the String constructor that takes a byte[] is undefined in these cases.)





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.