root / trunk / src / java / org / lidar / api / Video.java
History | View | Annotate | Download (500 Bytes)
| 1 | 9 | andrej.cim | package org.lidar.api; |
|---|---|---|---|
| 2 | |||
| 3 | import java.io.File; |
||
| 4 | import javax.jws.WebMethod; |
||
| 5 | import javax.jws.WebService; |
||
| 6 | import org.lidar.Util; |
||
| 7 | |||
| 8 | /**
|
||
| 9 | * Video API
|
||
| 10 | * @author Andrej Cimpersek
|
||
| 11 | */
|
||
| 12 | @WebService()
|
||
| 13 | public class Video { |
||
| 14 | 11 | andrej.cim | |
| 15 | 9 | andrej.cim | /**
|
| 16 | * Returns image
|
||
| 17 | * @return byte[] PNG image
|
||
| 18 | */
|
||
| 19 | @WebMethod()
|
||
| 20 | 11 | andrej.cim | public byte[] getImage(String lockToken) { |
| 21 | 9 | andrej.cim | try {
|
| 22 | return Util.GetBytesFromFile(new File("capture.png")); |
||
| 23 | } catch (Exception e) { |
||
| 24 | return null; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | 11 | andrej.cim | } |