public class FileUtil extends Object
| 构造器和说明 |
|---|
FileUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ConvertStreamToString(InputStream stream) |
static void |
downloadAttachment(byte[] bytes,
String name,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadAttachment(File file,
String name,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadAttachment(String path,
String name,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadInline(byte[] bytes,
String name,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadInline(File file,
String name,
javax.servlet.http.HttpServletResponse response) |
static void |
downloadInline(String path,
String name,
javax.servlet.http.HttpServletResponse response) |
static String |
getContentType(String returnFileName) |
static byte[] |
getFileByte(String url) |
static String |
getFileExtension(String name) |
static InputStream |
openInputStream(File file) |
public static byte[] getFileByte(String url)
public static String ConvertStreamToString(InputStream stream) throws IOException
IOExceptionpublic static InputStream openInputStream(File file)
public static void downloadInline(File file, String name, javax.servlet.http.HttpServletResponse response)
public static void downloadInline(String path, String name, javax.servlet.http.HttpServletResponse response)
public static void downloadInline(byte[] bytes,
String name,
javax.servlet.http.HttpServletResponse response)
public static void downloadAttachment(File file, String name, javax.servlet.http.HttpServletResponse response)
public static void downloadAttachment(String path, String name, javax.servlet.http.HttpServletResponse response)
public static void downloadAttachment(byte[] bytes,
String name,
javax.servlet.http.HttpServletResponse response)
Copyright © 2024. All rights reserved.