View Single Post
  #4 (permalink)  
Old June 12th, 2002
Unregistered
Guest
 
Posts: n/a
Default

/**
* Patching phex0.7.1 for Asia charset by
* woeiso@austin.ntntc.edu.tw
*/

public class IOUtil
{
.............
.............
public static int serializeString(String str, byte[] outbuf,
int offset)
{
byte[] temp = str.getBytes();
System.arraycopy(temp, 0, outbuf, offset, temp.length);
return offset+temp.length;
}
.............
.............
}
//=============================================

public class MsgQuery implements IMsg
{
.............
.............
public int getSize()
{
return mHeader.getSize() + 2 +
mSearchString.getBytes().length + 1;
}
.............
.............
}
//=============================================

public class MsgResRecord
{
.............
.............
public int getSize()
{
return 8 + fileName.getBytes().length + 2;
}
.............
.............
}
Reply With Quote