jdk/src/share/classes/java/nio/charset/MalformedInputException.java
changeset 19034 d068b8fff162
parent 5506 202f599c92aa
equal deleted inserted replaced
19033:13013b301bd0 19034:d068b8fff162
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    40 
    40 
    41     private static final long serialVersionUID = -3438823399834806194L;
    41     private static final long serialVersionUID = -3438823399834806194L;
    42 
    42 
    43     private int inputLength;
    43     private int inputLength;
    44 
    44 
       
    45     /**
       
    46      * Constructs an {@code MalformedInputException} with the given
       
    47      * length.
       
    48      * @param inputLength the length of the input
       
    49      */
    45     public MalformedInputException(int inputLength) {
    50     public MalformedInputException(int inputLength) {
    46         this.inputLength = inputLength;
    51         this.inputLength = inputLength;
    47     }
    52     }
    48 
    53 
       
    54     /**
       
    55      * Returns the length of the input.
       
    56      * @return the length of the input
       
    57      */
    49     public int getInputLength() {
    58     public int getInputLength() {
    50         return inputLength;
    59         return inputLength;
    51     }
    60     }
    52 
    61 
       
    62     /**
       
    63      * Returns the message.
       
    64      * @return the message
       
    65      */
    53     public String getMessage() {
    66     public String getMessage() {
    54         return "Input length = " + inputLength;
    67         return "Input length = " + inputLength;
    55     }
    68     }
    56 
    69 
    57 }
    70 }