/** * @param DvrFile poFile * @param OutputStream[] paWrite Lese Datenströme im Multi Part Streaming Format vom mit * dynamischer Chunk größe. * @throws InterruptedException */ private void readstream_multipart(BufferedOutputStream[] paWrite) throws IOException, InterruptedException { byte lbFileNo = 0; int lnChunkSize = 0; byte[] laBuffer = new byte[65536]; int lnRead = 0; do { lbFileNo = readbyte(); if (lbFileNo >= 0) { lnChunkSize = readint(); readskip(3); lnRead = readbyte(laBuffer, 0, lnChunkSize); paWrite[lbFileNo].write(laBuffer, 0, lnRead); } } while (resumeread(lbFileNo)); ack(); for (int i = 0; i < paWrite.length; i++) paWrite[i].close(); }
public String GetReceiverInfo() { Lock(); String lcName = ""; String lcLang = ""; write(Header.PT_GETSYSINFO); try { byte[] laFlags = new byte[5]; readbyte(laFlags); byte[] laLang = new byte[3]; readbyte(laLang); lcName = readstring(); ack(); } catch (IOException e) { e.printStackTrace(); } finally { Unlock(); } return lcName; }
private boolean ping() throws IOException { ack(); return readack(); }