public class

JebIoApiHelper

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.client.jebio.JebIoApiHelper

Class Overview

JEB.IO helper routines.

API end-point: https://www.pnfsoftware.com/io/api/

Summary

Constants
String BASE Current JEB.IO API end-point base.
Public Constructors
JebIoApiHelper(INet net, UserCredentials credentials)
Create a JEB.IO API helper.
Public Methods
long checkFileHash(String hash)
Check whether a file is already present on the JEB.IO.
long checkFileHash(File file)
Check whether a file is already present on the JEB.IO.
JebIoObjectUser createUser(String email, String password)
@return
byte[] downloadFile(String hash)
Download a file from JEB.IO/MSN.@return
JebIoObjectFile getFile(String hash)
@return
JebIoObjectUser getUser()
@return
String queryAssistant(int qtype, String data)
Query the assistant through JEB.IO.
int shareFile(File file, String name, String comments, SampleDetermination determination, boolean anonymous)
Upload and share a file on JEB.IO/MSN.@return
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String BASE

Current JEB.IO API end-point base.

Constant Value: "https://www.pnfsoftware.com/io/api"

Public Constructors

public JebIoApiHelper (INet net, UserCredentials credentials)

Create a JEB.IO API helper.

Parameters
net mandatory
credentials optional object; required for user operations and sharing operations

Public Methods

public long checkFileHash (String hash)

Check whether a file is already present on the JEB.IO. An API key is required.

Parameters
hash the file hash
Returns
  • <0=error, 0=found, 1=not_found
Throws
IOException

public long checkFileHash (File file)

Check whether a file is already present on the JEB.IO. An API key is required. If you have a hash already, you may prefer using checkFileHash(String).

Parameters
file the file
Returns
  • <0=error, 0=found, 1=not_found
Throws
IOException

public JebIoObjectUser createUser (String email, String password)

@return

Throws
IOException

public byte[] downloadFile (String hash)

Download a file from JEB.IO/MSN.@return

Throws
IOException

public JebIoObjectFile getFile (String hash)

@return

Throws
IOException

public JebIoObjectUser getUser ()

@return

Throws
IOException

public String queryAssistant (int qtype, String data)

Query the assistant through JEB.IO. This method is reserved and should not be called by third-party clients.

Returns
  • the response
Throws
IOException

public int shareFile (File file, String name, String comments, SampleDetermination determination, boolean anonymous)

Upload and share a file on JEB.IO/MSN.@return

Throws
IOException