Devam Ediyor

Android zu PHP

Wer kann mir die folgenden Zeilen von Android / C in PHP umschreiben?

private byte[] makeHeader(byte[] paramArrayOfByte, int paramInt1, byte paramByte, short paramShort1, short paramShort2, short paramShort3, int paramInt2)

{

paramArrayOfByte[0] = 13;

paramArrayOfByte[1] = (byte)paramInt1;

paramArrayOfByte[2] = paramByte;

paramArrayOfByte[3] = (byte)paramInt2;

[url removed, login to view](paramArrayOfByte, 4, 2).order(ByteOrder.LITTLE_ENDIAN).putShort(paramShort1);

[url removed, login to view](paramArrayOfByte, 6, 2).order(ByteOrder.LITTLE_ENDIAN).putShort(paramShort2);

[url removed, login to view](paramArrayOfByte, 8, 2).order(ByteOrder.LITTLE_ENDIAN).putShort(paramShort3);

return paramArrayOfByte;

}

public boolean sendData(Socket s, byte[] paramArrayOfByte) throws IOException

{

if (([url removed, login to view] == null) || ([url removed, login to view]()) || (![url removed, login to view]()))

return false;

try

{

OutputStream localOutputStream = [url removed, login to view]();

[url removed, login to view](paramArrayOfByte);

[url removed, login to view]();

return true;

}

finally

{

}

}

public boolean sendJSONPacket(Socket s, String paramString, int paramInt) throws IOException

{

[url removed, login to view]("Send message: " + paramString);

int i = paramInt + 12;

byte[] arrayOfByte = makeHeader(new byte[i], 4, id, (short)0, (short)1, (short)paramInt, 0);

[url removed, login to view]([url removed, login to view]([url removed, login to view]("UTF-8")), 0, arrayOfByte, 12, paramInt);

if(id < 255)

{

id = (byte)(1 + id);

}

else

id = 0;

return sendData(s, arrayOfByte);

}

Beceriler: Android, PHP, Yazılım Mimarisi

Daha fazlasını görün: int i, android string, socket android, android send string, null software, send message php, socket php, android order system, android system message, convert php application android, php flash android, html5 php mysql android, php api android, php mysql android, php jpg konverter, php upload android, socket message, php socket, string byte, utf php, message else php, private message system php, php else message, php private message system, byte string

İşveren Hakkında:
( 1 değerlendirme ) Groß Rogahn, Germany

Proje NO: #6541547

Seçilen:

gewasoft

Dieser source code macht ein JSON call mit sehr spezifischer logik. ich kann helfen aber brauche ein bischen hilfe von Euch.

1 gün içinde 55€ EUR
(0 Değerlendirme)
0.0