예제 #1
0
 public byte[] getJPEG() {
   if (isFake) {
     int length = fakeCamera.getJPEG(readBuffer, 4);
     System.arraycopy(
         getIntBytes(length), 0, readBuffer, 0, 4); // copy length to 4 first bytes in buffer
   } else {
     int length = realCamera.getJPEG(readBuffer, 4);
     System.arraycopy(
         getIntBytes(length), 0, readBuffer, 0, 4); // copy length to 4 first bytes in buffer
   }
   byte[] buffer = new byte[se.lth.cs.fakecamera.Axis211A.IMAGE_BUFFER_SIZE + 4];
   System.arraycopy(readBuffer, 0, buffer, 0, readBuffer.length);
   return buffer;
 }