📄 messageinfocomplex_fulldebug.jad
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3)
// Source File Name: MessageInfoComplex.java
package covertjava.decompile;
import java.io.PrintStream;
import java.io.Serializable;
public class MessageInfoComplex
implements Serializable
{
public static class MessageInfoPK
implements Serializable
{
public String id;
public MessageInfoPK()
{
}
}
public MessageInfoComplex(String hostName, String userName)
{
this.hostName = hostName;
this.userName = userName;
}
public String getHostName()
{
return hostName;
}
public String getUserName()
{
return userName;
}
public String getDisplayName()
{
return getUserName() + " (" + getHostName() + ")";
}
public String generateMessageId()
{
StringBuffer id = new StringBuffer(22);
String systemTime = "" + System.currentTimeMillis();
id.append(systemTime.substring(0, 6));
if(getUserName() != null && getUserName().length() > 0)
{
id.append('_');
int maxChars = Math.min(getUserName().length(), 8);
id.append(getUserName().substring(0, maxChars));
}
if(getHostName() != null && getHostName().length() > 0)
{
id.append('_');
int maxChars = Math.min(getHostName().length(), 7);
id.append(getHostName().substring(0, maxChars));
}
return id.toString();
}
public static void main(String args[])
{
(new Thread(new Runnable() {
public void run()
{
System.out.println("Running test");
MessageInfoComplex info = new MessageInfoComplex("JAMAICA", "Kalinovsky");
System.out.println("Message id = " + info.generateMessageId());
info = new MessageInfoComplex(null, "JAMAICA");
System.out.println("Message id = " + info.generateMessageId());
}
})).start();
}
String hostName;
String userName;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -