J2ME版本的记事本,类似于西门子C65自带的便签. // --------------------------------------------------- // ContentDataEntity.java // --------------------------------------------------- package src; import java.io. * ; public class ContentDataEntity ... { public String title; public String date; public String text; public ContentDataEntity(String title,String date,String text) ...{ this.title=title; this.text=text; this.date=date; } public ContentDataEntity() ...{} public byte[] encode() ...{ byte[] bytData=null; try ...{ ByteArrayOutputStream bos=new ByteArrayOutputStream(); DataOutputStream dos=new DataOutputStream(bos); dos.writeUTF(title); dos.writeUTF(text); dos.writeUTF(date); bytData=bos.toByteArray(); dos.close(); bos.close(); } catch(Exception erro) ...{} return bytData; } public void decode(byte[] data) ...{ try ...{ ByteArrayInputStream bis=new ByteArrayInputStream(data);<