1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
try {
InputStream iStream = m_TCPSocket.getInputStream();
iStream.read(buff);
String st = new String(buff);
String Groupes[] = st.split("$GRP");
for (int ng=0;ng<Groupes.length;ng++)
{
char[] LeGroupe= Groupes[ng].toCharArray();
short NumGrp= (short) (LeGroupe[0]*256+LeGroupe[1]);
short TailleGrp=(short) (LeGroupe[2]*256+LeGroupe[3]);
if (NumGrp==1)
{
//C'est ici que ça coince
ByteBuffer bufc = ByteBuffer.wrap(LeGroupe,4,3*8);
DoubleBuffer Temps = bufc.asDoubleBuffer();
}
} |
Partager