Code example for IOException

0
        // 11110www 10xxxxxx 10yyyyyy 10zzzzzz 
        else if ((firstByte & (byte) 0xF8) == (byte) 0xF0) {
            this.byteLength = 4;
        } 
        else { 
            throw new IOException(MessageFormat.format("Invalid UTF-8 first byte: {0}", firstByte));
        } 
    } 
 
    public int read() throws IOException { 
        if (available() == 0) { 
            return -1; 
        } 
 
        byteRead++;
 
        if (byteRead == 1) {
            return firstByte;
        } 
 
Contextual code suggestions in your IDE  Get Codota for Java