第4回:実機に載せよう(ダウンサイズ)
001: //package com.s_cradle.improve.client;
002:
003: import java.io.DataInputStream;
004: import java.io.IOException;
005:
006: /**
007: * Copyright (C) 2003 Sophia Cradle, Inc.
008: *
009: * メッセージを表現するクラスです。。
010: *
011: * @author Masaru Yoshimura
012: */
013: public class K/*Message*/ {
014: //downsize 定数展開
015: /*
016: public static final int FROM_ME = 0;
017: public static final int FROM_OTHER = 1;
018: */
019:
020: //downsize メソッドインライン化
021:
022: public String[] Code/*strs2*/ = new String[2];
023: //downsize 配列化
024: //public String account;
025: //public String content;
026:
027: public int[] StackMap/*idata1*/ = new int[2];
028: //downsize 配列化
029: //public int type;
030: //public int from;
031:
032: /**
033: * DataInputStream からの構築。(友達用)
034: */
035: public K/*Message*/(DataInputStream input) throws IOException{
036: Code/*strs2*/[0]/*account*/ = input.readUTF();
037: StackMap/*idata1*/[0]/*type*/ = input.readInt();
038: Code/*strs2*/[1]/*content*/ = input.readUTF();
039: StackMap/*idata1*/[1]/*from*/ = 1;//FROM_OTHER;
040: }
041:
042: /**
043: * Stringからの構築(本人用)
044: */
045: public K/*Message*/(String target, String content_){
046: Code/*strs2*/[0]/*account*/ = target;
047: Code/*strs2*/[1]/*content*/ = content_;
048: StackMap/*idata1*/[1]/*from*/ = 0;//FROM_ME;
049: }
050:
051: // ここよりgetter
052: //downsize メソッドインライン化
053: /*
054: public String getAccount(){
055: return account;
056: }
057:
058: public int getType(){
059: return type;
060: }
061:
062: public String getContent(){
063: return content;
064: }
065:
066: public int getFrom(){
067: return from;
068: }
069: */