saker.nest Documentation TaskDoc JavaDoc Packages
public class ServerStorageUtils
Utility class containing functions operating with the server storage.
Nested types
public interface
Contains information abount a bundle upload operation.
Methods
public static UploadResult
uploadBundle(String server, BundleIdentifier bundleid, StreamWritable bundledata, byte[] apikey, byte[] apisecret, Boolean overwrite)
Uploads a Nest bundle to the server specified at the given URL.
public static UploadResult uploadBundle(String server, BundleIdentifier bundleid, StreamWritable bundledata, byte[] apikey, byte[] apisecret, Boolean overwrite) throws NullPointerException, IOException
Uploads a Nest bundle to the server specified at the given URL.

The method will upload the bundle specified by the bundle data argument to the server at the given URL. The upload uses the protocol for the Nest server.

The API key and API secret byte array arguments are used for authorization of the upload. These are the binary representation of the keys, not in any Base64 or other encoded formats. The keys for the upload can be retrieved from the associated web page of the server. (From the bundle management page at: https://nest.saker.build/user/packages)

The overwrite attribute specifies whether the upload should overwrite any previously uploaded bundle with the same bundle identifier. If null, it will be unspecified and the server defaults are used.

serverThe server to upload the bundle to. (Shouldn't contain a trailing slash (/).)
bundleidThe bundle identifier of the bundle that is being uploaded.
bundledataThe handle to the bundle data.
apikeyThe API key to use for authorization.
apisecretThe API secret to use for authorization.
overwriteWhether or not to specify the overwrite flag during upload. If null, no overwrite argument is issued to the server.
The result information about the upload.
NullPointerExceptionIf any of the arguments except overwrite is null.
IOExceptionIf the upload fails for some reason.