public final class Theta
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
Theta()
Connect to THETA.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(ThetaEventListener listener)
Add an event listener.
|
void |
close() |
void |
deleteObject(UINT32 objectHandle)
Deletes the object specified by the ObjectHandle.
|
int |
getAudioVolume()
Acquires or set the volume for the shutter sound.
|
int |
getAutoPowerOffDelay()
Acquires the time in minutes to start the auto power off.
|
BatteryLevel |
getBatteryLevel()
Acquires the battery charge level.
|
CaptureStatus |
getCaptureStatus()
Acquires the camera shooting execution status.
|
ChannelNumber |
getChannelNumber()
Acquires the wireless LAN channel number.
|
java.util.Date |
getDateTime()
Acquires the date and time.
|
DeviceInfo |
getDeviceInfo()
Returns information and capabilities about THETA.
|
ErrorInfo |
getErrorInfo()
Acquires the error information.
|
ExposureBiasCompensation |
getExposureBiasCompensation()
Acquires or set the exposure bias compensation value.
|
ISOSpeed |
getExposureIndex()
Acquires the ISO sensitivity.
|
GPSInfo |
getGPSInfo()
Acquires the GPS information.
|
long |
getNumObjects()
Returns the total number of objects.
|
void |
getObject(UINT32 objectHandle,
java.io.OutputStream dst)
Retrieves the object's data and writes to the dst.
|
java.util.List<UINT32> |
getObjectHandles()
Returns a list of the object handles.
|
ObjectInfo |
getObjectInfo(UINT32 objectHandle)
Returns a ObjectInfo for the object specified by the objectHandle.
|
int |
getRecordingTime()
Acquires the video recording time in seconds.
|
int |
getRemainingRecordingTime()
Acquires the amount of time remaining in seconds for recording video.
|
void |
getResizedImageObject(UINT32 objectHandle,
java.io.OutputStream dst)
Retrieves the object's resized data and writes to the dst.
|
ShutterSpeed |
getShutterSpeed()
Acquires the shutter speed.
|
int |
getSleepDelay()
Acquires the time in seconds to start sleep.
|
StillCaptureMode |
getStillCaptureMode()
Acquires the still image shooting method.¥
|
void |
getThumb(UINT32 objectHandle,
java.io.OutputStream dst)
Retrieves the object's thumbnail data and writes to the dst.
|
int |
getTimelapseInterval()
Acquires the shooting interval in msec for interval shooting.
|
int |
getTimelapseNumber()
Acquires the upper limit value for interval shooting.
|
WhiteBalance |
getWhiteBalance()
Acquires the white balance.
|
UINT32 |
initiateCapture()
Captures an image synchronously.
|
UINT32 |
initiateOpenCapture()
Starts the video recording or the interval shooting.
|
boolean |
removeListener(ThetaEventListener listener)
Remove an event listener.
|
void |
setAudioVolume(int audioVolume)
Set the volume for the shutter sound.
|
void |
setAutoPowerOffDelay(int autoPowerOffDelay)
Sets the time in minutes to start the auto power off.
|
void |
setChannelNumber(ChannelNumber channelNumber)
Sets the wireless LAN channel number.
|
void |
setDateTime(java.util.Date dateTime)
Sets the date and time.
|
void |
setExposureBiasCompensation(ExposureBiasCompensation exposureBiasCompensation)
Sets the exposure bias compensation value.
|
void |
setExposureIndex(ISOSpeed isoSpeed)
Sets the ISO sensitivity.
|
void |
setGPSInfo(GPSInfo gpsInfo)
Sets the GPS information.
|
void |
setShutterSpeed(ShutterSpeed shutterSpeed)
Sets the shutter speed.
|
void |
setSleepDelay(int sleepDelay)
Sets the time in seconds to start sleep.
|
void |
setStillCaptureMode(StillCaptureMode stillCaptureMode)
Sets the still image shooting method.
|
void |
setTimelapseInterval(int timelapseInterval)
Sets the shooting interval in msec for interval shooting.
|
void |
setTimelapseNumber(int timelapseNumber)
Sets the upper limit value for interval shooting.
|
void |
setWhiteBalance(WhiteBalance whiteBalance)
Sets the white balance.
|
void |
terminateOpenCapture()
Exits a continuous shooting.
|
public Theta() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while connecting THETA.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public DeviceInfo getDeviceInfo() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while getting the device information.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public long getNumObjects() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while getting the number of objects.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public java.util.List<UINT32> getObjectHandles() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while getting the list of object handles.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public ObjectInfo getObjectInfo(UINT32 objectHandle) throws java.io.IOException
objectHandle
- The ObjectHandle of the object to acquire the ObjectInfo.java.io.IOException
- if an I/O error occurs while getting the ObjectInfo.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if objectHandle is null.public void getObject(UINT32 objectHandle, java.io.OutputStream dst) throws java.io.IOException
objectHandle
- The ObjectHandle of the object to acquire the data.dst
- The destination for the object's data.java.io.IOException
- if an I/O error occurs while receiving data.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if an argument is null.public void getThumb(UINT32 objectHandle, java.io.OutputStream dst) throws java.io.IOException
objectHandle
- The ObjectHandle of the object to acquire the thumbnail data.dst
- The destination for the object's thumbnail data.java.io.IOException
- if an I/O error occurs while receiving thumbnail data.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if an argument is null.public void deleteObject(UINT32 objectHandle) throws java.io.IOException
objectHandle
- The ObjectHandle of the object to delete.java.io.IOException
- if an I/O error occurs while deleting the object.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if objectHandle is null.public UINT32 initiateCapture() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
- if an I/O error occurs while capturing an image.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.InterruptedException
- The invoker thread is interrupted while capturing an image.public void terminateOpenCapture() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while exiting capturing.org.theta4j.ptp.PtpException
- if the PTP response is not OK.initiateOpenCapture()
public UINT32 initiateOpenCapture() throws java.io.IOException
java.io.IOException
- if an I/O error occurs while initiating capturing.org.theta4j.ptp.PtpException
- if the PTP response is not OK.terminateOpenCapture()
public void getResizedImageObject(UINT32 objectHandle, java.io.OutputStream dst) throws java.io.IOException
objectHandle
- The ObjectHandle of the object to acquire the resized data.dst
- The destination for the object's resized data.java.io.IOException
- if an I/O error occurs receiving resized image.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public BatteryLevel getBatteryLevel() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public WhiteBalance getWhiteBalance() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setWhiteBalance(WhiteBalance whiteBalance) throws java.io.IOException
java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if whiteBalance is null.public ISOSpeed getExposureIndex() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setExposureIndex(ISOSpeed isoSpeed) throws java.io.IOException
isoSpeed
- An ISO speedjava.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if isoSpeed is null.public ExposureBiasCompensation getExposureBiasCompensation() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setExposureBiasCompensation(ExposureBiasCompensation exposureBiasCompensation) throws java.io.IOException
exposureBiasCompensation
- An exposure bias compensation value to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if exposureBiasCompensation is null.public java.util.Date getDateTime() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setDateTime(java.util.Date dateTime) throws java.io.IOException
dateTime
- A date and time to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if dateTime is null.public StillCaptureMode getStillCaptureMode() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setStillCaptureMode(StillCaptureMode stillCaptureMode) throws java.io.IOException
stillCaptureMode
- A still capture mode to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if stillCaptureMode is null.public int getTimelapseNumber() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setTimelapseNumber(int timelapseNumber) throws java.io.IOException
timelapseNumber
- The upper limit value for interval shooting. The valid range is in 0 or 2-65535. The 0 means unlimited.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if timelapseNumber is null.public int getTimelapseInterval() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setTimelapseInterval(int timelapseInterval) throws java.io.IOException
timelapseInterval
- The shooting interval in msec for interval shooting. The valid range is in 5000-3600000.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if timelapseInterval is null.public int getAudioVolume() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setAudioVolume(int audioVolume) throws java.io.IOException
audioVolume
- The volume for the shutter sound. The valid range is in 0-100.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if audioVolume is null.public ErrorInfo getErrorInfo() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public ShutterSpeed getShutterSpeed() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setShutterSpeed(ShutterSpeed shutterSpeed) throws java.io.IOException
shutterSpeed
- The shutter speed to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if shutterSpeed is null.public GPSInfo getGPSInfo() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setGPSInfo(GPSInfo gpsInfo) throws java.io.IOException
gpsInfo
- The GPS information to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if gpsInfo is null.public int getAutoPowerOffDelay() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setAutoPowerOffDelay(int autoPowerOffDelay) throws java.io.IOException
autoPowerOffDelay
- The time in minutes to start the auto power off. The valid range is in 0-30. The 0 disables the auto power off.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if autoPowerOffDelay is null.public int getSleepDelay() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setSleepDelay(int sleepDelay) throws java.io.IOException
sleepDelay
- The time in seconds to start sleep. The valid range is in 0-1800. Does not switch to sleep mode with 0.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if sleepDelay is null.public ChannelNumber getChannelNumber() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public void setChannelNumber(ChannelNumber channelNumber) throws java.io.IOException
channelNumber
- The wireless LAN channel number to set.java.io.IOException
- if an I/O error occurs setting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.java.lang.NullPointerException
- if channelNumber is null.public CaptureStatus getCaptureStatus() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public int getRecordingTime() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public int getRemainingRecordingTime() throws java.io.IOException
java.io.IOException
- if an I/O error occurs getting the value.org.theta4j.ptp.PtpException
- if the PTP response is not OK.public boolean addListener(ThetaEventListener listener)
listener
- An event listener to add.java.lang.NullPointerException
- if listener is null.public boolean removeListener(ThetaEventListener listener)
listener
- An event listener to add.java.lang.NullPointerException
- if listener is null.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException