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 */
018package org.apache.directory.api.util.exception;
019
020
021import java.io.IOException;
022
023import org.apache.directory.api.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 */
031public class InvalidCharacterException extends IOException
032{
033    private static final long serialVersionUID = 1L;
034    private int input;
035
036
037    public InvalidCharacterException( int input )
038    {
039        this.input = input;
040    }
041
042
043    @Override
044    public String getMessage()
045    {
046        return I18n.err( I18n.ERR_04335, Integer.toHexString( input ) );
047    }
048}