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 /**
024 *
025 * Exception thrown when a Character is invalid
026 *
027 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
028 * @version $Rev$, $Date$
029 */
030 public class InvalidCharacterException extends IOException
031 {
032 private static final long serialVersionUID = 1L;
033 private int input;
034
035
036 public InvalidCharacterException( int input )
037 {
038 this.input = input;
039 }
040
041
042 @Override
043 public String getMessage()
044 {
045 return "Invalid Character 0x" + Integer.toHexString( input );
046 }
047 }