Java Code Examples for org.apache.commons.fileupload.util.Streams#checkFileName()

The following examples show how to use org.apache.commons.fileupload.util.Streams#checkFileName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DiskFileItem.java    From Mars-Java with MIT License 2 votes vote down vote up
/**
 * Returns the original filename in the client's filesystem.
 *
 * @return The original filename in the client's filesystem.
 * @throws org.apache.commons.fileupload.InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   {@link org.apache.commons.fileupload.InvalidFileNameException#getName()}.
 */
@Override
public String getName() {
    return Streams.checkFileName(fileName);
}
 
Example 2
Source File: FileUploadBase.java    From Mars-Java with MIT License 2 votes vote down vote up
/**
 * Returns the items file name.
 *
 * @return File name, if known, or null.
 * @throws InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   InvalidFileNameException#getName().
 */
public String getName() {
    return Streams.checkFileName(name);
}
 
Example 3
Source File: DiskFileItem.java    From onedev with MIT License 2 votes vote down vote up
/**
 * Returns the original filename in the client's filesystem.
 *
 * @return The original filename in the client's filesystem.
 * @throws org.apache.commons.fileupload.InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   {@link org.apache.commons.fileupload.InvalidFileNameException#getName()}.
 */
public String getName() {
    return Streams.checkFileName(fileName);
}
 
Example 4
Source File: FileUploadBase.java    From steady with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the items file name.
 *
 * @return File name, if known, or null.
 * @throws InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   InvalidFileNameException#getName().
 */
public String getName() {
    return Streams.checkFileName(name);
}
 
Example 5
Source File: DiskFileItem.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the original filename in the client's filesystem.
 *
 * @return The original filename in the client's filesystem.
 * @throws org.apache.commons.fileupload.InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   {@link org.apache.commons.fileupload.InvalidFileNameException#getName()}.
 */
public String getName() {
    return Streams.checkFileName(fileName);
}
 
Example 6
Source File: FileUploadBase.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the items file name.
 *
 * @return File name, if known, or null.
 * @throws InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   InvalidFileNameException#getName().
 */
public String getName() {
    return Streams.checkFileName(name);
}
 
Example 7
Source File: DiskFileItem.java    From AndroidWebServ with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the original filename in the client's filesystem.
 *
 * @return The original filename in the client's filesystem.
 * @throws org.apache.commons.fileupload.InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   {@link org.apache.commons.fileupload.InvalidFileNameException#getName()}.
 */
public String getName() {
    return Streams.checkFileName(fileName);
}
 
Example 8
Source File: FileUploadBase.java    From AndroidWebServ with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the items file name.
 *
 * @return File name, if known, or null.
 * @throws InvalidFileNameException The file name contains a NUL character,
 *   which might be an indicator of a security attack. If you intend to
 *   use the file name anyways, catch the exception and use
 *   InvalidFileNameException#getName().
 */
public String getName() {
    return Streams.checkFileName(name);
}