it.lilik.capturemjpeg
Class MJPEGInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
it.lilik.capturemjpeg.MJPEGInputStream
- All Implemented Interfaces:
- Closeable
public class MJPEGInputStream
- extends FilterInputStream
This class provides the method byte[] readImage()
which returns
a byte array containing a complete JPEG image extracted from the InputStream
provided, which should be a MotionJPEG stream.
- Author:
- Alessio Caiazza, Cosimo Cecchi
Method Summary |
byte[] |
readImage()
Returns a byte array containing the next JPEG image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MJPEGInputStream
public MJPEGInputStream(InputStream arg0,
String boundary)
- Creates a MotionJPEG parser from
arg0 InputStream
- Parameters:
arg0
- boundary
- the boundary string delimiting every images
readImage
public byte[] readImage()
throws IOException
- Returns a byte array containing the next JPEG image.
- Returns:
- a byte array containing the next JPEG image
- Throws:
IOException
- if no image is available
Copyright © 2008-09 Alessio Caiazza, Cosimo Cecchi All Rights Reserved.