java.lang.Object
com.smartdevicelink.proxy.RPCStruct
com.smartdevicelink.proxy.RPCMessage
com.smartdevicelink.proxy.RPCRequest
Parameter List
Name | Type | Description | Req. | Notes | Version Available |
---|---|---|---|---|---|
FileName | String | File reference name. | Y | Maxlength=500 | SmartDeviceLink 2.0 |
fileType | FileType | Selected file type. | Y | SmartDeviceLink 2.0 | |
persistentFile | Boolean | Indicates if the file is meant to persist between sessions / ignition cycles. If set to TRUE,then the system will aim to persist this file through session / cycles. While files with this designation will have priority over others,they are subject to deletion by the system at any time.In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file. If omitted, the value will be set to false. | N | SmartDeviceLink 2.0 | |
systemFile | Boolean | Indicates if the file is meant to be passed thru core to elsewhere on the system. If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core. If omitted, the value will be set to false. | N | SmartDeviceLink 2.3.2 | |
offset | Float | Optional offset in bytes for resuming partial data chunks | N | Minvalue=0; Maxvalue=100000000000 | SmartDeviceLink 2.3.2 |
length | Float | Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded | N | Minvalue=0; Maxvalue=100000000000 | SmartDeviceLink 2.3.2 |
crc | Long | Additional CRC32 checksum to protect data integrity up to 512 Mbits . | N | minvalue="0" maxvalue="4294967295" | SmartDeviceLink 2.3.2 |
Note:
When using PutFiles you may want to check for memoryResponse
Response is sent, when the file data was copied (success case). Or when an error occurred. Not supported on First generation SDL modules.Non-default Result Codes:
SUCCESS
INVALID_DATA
OUT_OF_MEMORY
TOO_MANY_PENDING_REQUESTS
APPLICATION_NOT_REGISTERED
GENERIC_ERROR
REJECTED
Name | Type | Description | Req. | Notes | Version Available |
---|---|---|---|---|---|
spaceAvailable | Integer | Provides the total local space available on SDL for the registered app. | Minvalue=0; Maxvalue=2000000000 | SmartDeviceLink 2.0 |
public static final java.lang.String KEY_PERSISTENT_FILE
public static final java.lang.String KEY_SYSTEM_FILE
public static final java.lang.String KEY_FILE_TYPE
public static final java.lang.String KEY_SDL_FILE_NAME
public static final java.lang.String KEY_OFFSET
public static final java.lang.String KEY_LENGTH
public static final java.lang.String KEY_CRC
Constructs a new PutFile object
public PutFile()
Constructs a new PutFile object indicated by the Hashtable parameter
public PutFile(java.util.Hashtable<java.lang.String, java.lang.Object> hash)
Constructs a new PutFile object
public PutFile(String syncFileName,FileType fileType)
Sets a file reference name
public com.smartdevicelink.proxy.rpc.PutFile setSdlFileName(String sdlFileName)
Gets a file reference name
public java.lang.String getSdlFileName()
Sets file type
public com.smartdevicelink.proxy.rpc.PutFile setFileType(FileType fileType)
Gets a file type
public com.smartdevicelink.proxy.rpc.enums.FileType getFileType()
Sets a value to indicates if the file is meant to persist between sessions / ignition cycles. If set to TRUE, then the system will aim to persist this file through session / cycles. While files with this designation will have priority over others, they are subject to deletion by the system at any time. In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file. If omitted, the value will be set to false
public com.smartdevicelink.proxy.rpc.PutFile setPersistentFile(Boolean persistentFile)
Gets a value to Indicates if the file is meant to persist between sessions / ignition cycles
public java.lang.Boolean getPersistentFile()
public com.smartdevicelink.proxy.rpc.PutFile setFileData(byte[] fileData)
public byte getFileData()
Deprecated
public com.smartdevicelink.proxy.rpc.PutFile setOffset(Integer offset)
public com.smartdevicelink.proxy.rpc.PutFile setOffset(Long offset)
public java.lang.Long getOffset()
Deprecated
public com.smartdevicelink.proxy.rpc.PutFile setLength(Integer length)
public com.smartdevicelink.proxy.rpc.PutFile setLength(Long length)
public java.lang.Long getLength()
public com.smartdevicelink.proxy.rpc.PutFile setSystemFile(Boolean systemFile)
public java.lang.Boolean getSystemFile()
This takes the file data as an array of bytes and calculates the CRC32 for it.
public com.smartdevicelink.proxy.rpc.PutFile setCRC(byte[] fileData)
This assumes you have created your own CRC32 and are setting it with the file Please avoid using your own calculations for this, and use the method included in java.util
public com.smartdevicelink.proxy.rpc.PutFile setCRC(Long crc)
This returns the CRC, if it has been set, for the file object
public java.lang.Long getCRC()
From Class | Methods |
---|---|
com.smartdevicelink.proxy.RPCRequest | getCorrelationID, setCorrelationID, setOnRPCResponseListener, getOnRPCResponseListener |
com.smartdevicelink.proxy.RPCMessage | getFunctionID, getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong |
com.smartdevicelink.proxy.RPCStruct | getStoreValue, getStore, deserializeJSON, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong, clone, equals, hashCode |
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |