Class SysProtocol

java.lang.Object
com.adobe.xfa.protocol.SysProtocol
All Implemented Interfaces:
Protocol

public class SysProtocol extends Object implements Protocol
  • Constructor Details

    • SysProtocol

      public SysProtocol()
      The default c'tor -- instantiate a Protocol object.
    • SysProtocol

      public SysProtocol(AuthenticationHandler authenticationHandler, URLStreamHandler urlStreamHandler)
  • Method Details

    • get

      public InputStream get(String sUrl)
      Method to get (download) a file designated by the given URL.
      Specified by:
      get in interface Protocol
      Parameters:
      sUrl - the URL to download.
      Returns:
      an InputStream that contains the downloaded data.
      Throws:
      ExFull - "Couldn't read/get data from '%s'." exception.
    • put

      public void put(String sFileName, String sUrl)
      Method to put (upload) the given file to a file designated by the given URL.
      Specified by:
      put in interface Protocol
      Parameters:
      sFileName - the file to upload.
      sUrl - the name of the URL to upload to.
      Throws:
      ExFull - "stream implementation unavailable" exception.
    • put

      public void put(InputStream iFile, String sUrl)
      Method to put (upload) memory to a designated URL. The Internet server targeted by the URL must obviously be configured to allow uploads.
      Specified by:
      put in interface Protocol
      Parameters:
      iFile - the InputStream to be uploaded to the URL.
      sUrl - the name of the URL to upload memory to.
    • post

      public Protocol.PostRsvp post(Protocol.SimplePostData oData, String sUrl)
      Method to post form data to a designated URL. The targeted URL must obviously be designed to read the data posted.
      Specified by:
      post in interface Protocol
      Parameters:
      oData - a description of the data being posted to the URL.
      sUrl - the name of the URL to post data to.
      Returns:
      The status and response from the Post as a PostRsvp object.
    • post

      public Protocol.PostRsvp post(List<? extends Protocol.MultiPartDesc> oData, String sUrl)
      Virtual method to post form data to a designated URL. The targeted URL must obviously be designed to read the data posted.
      Specified by:
      post in interface Protocol
      Parameters:
      oData - a description of the data being posted to the URL.
      sUrl - the name of the URL to post data to.
      Returns:
      The status and response from the Post as a PostRsvp object
    • getAuthenticationHandler

      public AuthenticationHandler getAuthenticationHandler()
      Gets this protocol's authentication handler.
      Specified by:
      getAuthenticationHandler in interface Protocol
      Returns:
      an AuthenticationHandler, or null.
    • getURLStreamHandler

      public URLStreamHandler getURLStreamHandler()
      Description copied from interface: Protocol
      Gets the protocol's URL stream handler. This method is required for all implementations of custom protocols and must return a non-null value.
      Specified by:
      getURLStreamHandler in interface Protocol
      Returns:
      an URL stream handler.
    • isTrusted

      public boolean isTrusted(String sURL, Protocol.TrustType eTrustType, boolean bThrow)
      Description copied from interface: Protocol
      Determines if the given URL can be trusted according to the given type of enforcement rule.
      Specified by:
      isTrusted in interface Protocol
      Parameters:
      sURL - the URL to be trusted.
      eTrustType - the type of trust enforcement needed.
      bThrow - when true, requests that a trust exception (ExFull) be thrown if the URL is not trusted.
      Returns:
      true if trusted, otherwise false.
    • scheme

      public String scheme()
      Description copied from interface: Protocol
      Gets the protocol's scheme. This method is required for all implementations of custom protocols and must return a non-null, non-empty value.
      Specified by:
      scheme in interface Protocol
      Returns:
      this protocol's scheme.