本文整理汇总了Java中org.apache.commons.fileupload.util.Streams.checkFileName方法的典型用法代码示例。如果您正苦于以下问题:Java Streams.checkFileName方法的具体用法?Java Streams.checkFileName怎么用?Java Streams.checkFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.fileupload.util.Streams
的用法示例。
在下文中一共展示了Streams.checkFileName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getName
import org.apache.commons.fileupload.util.Streams; //导入方法依赖的package包/类
@Override
public String getName()
{
return Streams.checkFileName(fileName);
}
示例2: getName
import org.apache.commons.fileupload.util.Streams; //导入方法依赖的package包/类
/**
* 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);
}
示例3: getName
import org.apache.commons.fileupload.util.Streams; //导入方法依赖的package包/类
/**
* 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);
}