untitled1.java~6~
来自「Contains a complete archiver by Haruhiko」· JAVA~6~ 代码 · 共 37 行
JAVA~6~
37 行
package ejb;
public class Untitled1 {
public Untitled1() {
}
public static void main(String[] args) {
}
public String getPart(Part part, int partNum) throws MessagingException,
IOException {
String s = "";
String s1 = "";
String s2 = "";
String s3 = "";
String sct = part.getContentType();
if (sct == null) {
s = "part 无效";
return s;
}
ContentType ct = new ContentType(sct);
if (ct.match("text/plain")) {
s1 = " " + (String) part.getContent() + " ";
}
else {
String temp = "";
if ( (temp = part.getFileName()) != null)
s2 = "Filename: " + temp + " ";
temp = null;
if ( (temp = part.getDescription()) != null)
s3 = "Description: " + temp + " ";
}
s = s1 + s2 + s3;
return s;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?