001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. The ASF licenses this file to You
004 * under the Apache License, Version 2.0 (the "License"); you may not
005 * use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License. For additional information regarding
015 * copyright in this work, please see the NOTICE file in the top level
016 * directory of this distribution.
017 */
018 package org.apache.directory.shared.ldap.util.unicode;
019
020
021 import java.io.IOException;
022
023 import org.apache.directory.shared.i18n.I18n;
024
025 /**
026 *
027 * Exception thrown when a Character is invalid
028 *
029 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
030 * @version $Rev$, $Date$
031 */
032 public class InvalidCharacterException extends IOException
033 {
034 private static final long serialVersionUID = 1L;
035 private int input;
036
037
038 public InvalidCharacterException( int input )
039 {
040 this.input = input;
041 }
042
043
044 @Override
045 public String getMessage()
046 {
047 return I18n.err( I18n.ERR_04335, Integer.toHexString( input ) );
048 }
049 }