001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.vfs2.provider.ftp;
018
019import org.apache.commons.net.ftp.FTP;
020
021/**
022 * The FTP file types.
023 *
024 * @since 2.1
025 */
026public enum FtpFileType {
027    /**
028     * The ASCII file type.
029     */
030    ASCII(FTP.ASCII_FILE_TYPE),
031
032    /**
033     * The binary file type.
034     */
035    BINARY(FTP.BINARY_FILE_TYPE),
036
037    /**
038     * The local file type.
039     */
040    LOCAL(FTP.LOCAL_FILE_TYPE),
041
042    /**
043     * The EBCDIC file type.
044     */
045    EBCDIC(FTP.EBCDIC_FILE_TYPE);
046
047    /**
048     * The Apache Commons Net FTP file type.
049     */
050    private final int value;
051
052    /**
053     * Constructs a file type.
054     *
055     * @param fileType The Apache Commons Net FTP file type.
056     */
057    private FtpFileType(final int fileType) {
058        this.value = fileType;
059    }
060
061    /**
062     * Gets the Apache Commons Net FTP file type.
063     *
064     * @return The Apache Commons Net FTP file type.
065     */
066    int getValue() {
067        return this.value;
068    }
069}