mimemessage.java
来自「《JAVA与模式》附书中源代码」· Java 代码 · 共 28 行
JAVA
28 行
package com.javapatterns.builder.message;
/**
* This is a class used to represent raw MIME e-mail messages. If this
* program is expanded to receive messages in formats other than MIME,
* then this will probably become an abstract class with a subclass for
* each type of e-mail format that can be received.
*/
public class MIMEMessage {
private byte[] rawMessage;
/**
* Constructor
* @param msg A byte array containing a raw unprocessed e-mail
* message.
*/
public MIMEMessage(byte[] msg) {
rawMessage = msg;
} // constructor(byte[])
/**
* Return the raw bytes of an unprocessed e-mail message.
*/
byte[] getMessage() {
return rawMessage;
} // getMessage()
} // class MIMEMessage
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?