All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.silentgo.servlet.oreilly.multipart.Part Maven / Gradle / Ivy

There is a newer version: 0.0.49
Show newest version
// Copyright (C) 1999-2001 by Jason Hunter .
// All rights reserved.  Use of this class is limited.
// Please see the LICENSE for more information.
 
package com.silentgo.servlet.oreilly.multipart;

/**
 * A Part is an abstract upload part which represents an 
 * INPUT form element in a multipart/form-data form 
 * submission.
 * 
 * @see FilePart
 * @see ParamPart
 * 
 * @author Geoff Soutter
 * @version 1.0, 2000/10/27, initial revision
 */
public abstract class Part {
  private String name;
  
  /**
   * Constructs an upload part with the given name.
   */
  Part(String name) {
    this.name = name;
  }
  
  /**
   * Returns the name of the form element that this Part corresponds to.
   * 
   * @return the name of the form element that this Part corresponds to.
   */
  public String getName() {
    return name;
  }
  
  /**
   * Returns true if this Part is a FilePart.
   * 
   * @return true if this is a FilePart.
   */
  public boolean isFile() {
    return false;
  }
  
  /**
   * Returns true if this Part is a ParamPart.
   * 
   * @return true if this is a ParamPart.
   */
  public boolean isParam() {
    return false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy