Class JebIoApiHelper

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

public class JebIoApiHelper extends Object
JEB.IO helper routines.

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

  • Field Details

  • Constructor Details

    • JebIoApiHelper

      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
  • Method Details

    • createUser

      public JebIoObjectUser createUser(String email, String password) throws IOException
      Parameters:
      email -
      password -
      Returns:
      Throws:
      IOException
    • getUser

      public JebIoObjectUser getUser() throws IOException
      Returns:
      Throws:
      IOException
    • checkFileHash

      public long checkFileHash(File file) throws IOException
      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
    • checkFileHash

      public long checkFileHash(String hash) throws IOException
      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
    • getFile

      public JebIoObjectFile getFile(String hash) throws IOException
      Parameters:
      hash -
      Returns:
      Throws:
      IOException
    • shareFile

      public int shareFile(File file, String name, String comments, SampleDetermination determination, boolean anonymous) throws IOException
      Upload and share a file on JEB.IO/MSN.
      Parameters:
      file -
      name -
      comments -
      determination -
      anonymous -
      Returns:
      Throws:
      IOException
    • downloadFile

      public byte[] downloadFile(String hash) throws IOException
      Download a file from JEB.IO/MSN.
      Parameters:
      hash -
      Returns:
      Throws:
      IOException
    • queryAssistant

      public String queryAssistant(int qtype, String data) throws IOException
      Query the assistant through JEB.IO. This method is reserved and should not be called by third-party clients.
      Parameters:
      qtype -
      data -
      Returns:
      the response
      Throws:
      IOException