diff --git a/.idea/artifacts/calmnetlib.xml b/.idea/artifacts/calmnetlib.xml new file mode 100644 index 0000000..6de8268 --- /dev/null +++ b/.idea/artifacts/calmnetlib.xml @@ -0,0 +1,8 @@ + + + $PROJECT_DIR$/out/artifacts/calmnetlib + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index c14dbda..1ef2f8e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,10 @@ + + diff --git a/JavaDoc/allclasses-frame.html b/JavaDoc/allclasses-frame.html new file mode 100644 index 0000000..a4f6f91 --- /dev/null +++ b/JavaDoc/allclasses-frame.html @@ -0,0 +1,58 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/JavaDoc/allclasses-noframe.html b/JavaDoc/allclasses-noframe.html new file mode 100644 index 0000000..ee017f4 --- /dev/null +++ b/JavaDoc/allclasses-noframe.html @@ -0,0 +1,58 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/CandidateClient.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/CandidateClient.html new file mode 100644 index 0000000..d67223f --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/CandidateClient.html @@ -0,0 +1,400 @@ + + + + + +CandidateClient + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class CandidateClient

+
+
+ +
+
    +
  • +
    +
    +
    public final class CandidateClient
    +extends java.lang.Object
    +
    This class provides a candidate client for NetMarshalServers.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      booleanaccept +
      Whether the candidate should be accepted.
      +
      java.net.InetAddressaddress +
      The remote address of the candidate.
      +
      intport +
      The remote port of the candidate.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CandidateClient(java.net.InetAddress address, + int port) +
      Constructs a new instance of CandidateClient with an address and port.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        address

        +
        public final java.net.InetAddress address
        +
        The remote address of the candidate.
        +
      • +
      + + + +
        +
      • +

        port

        +
        public final int port
        +
        The remote port of the candidate.
        +
      • +
      + + + +
        +
      • +

        accept

        +
        public boolean accept
        +
        Whether the candidate should be accepted.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CandidateClient

        +
        public CandidateClient(java.net.InetAddress address,
        +                       int port)
        +
        Constructs a new instance of CandidateClient with an address and port.
        +
        +
        Parameters:
        +
        address - The remote address of the candidate.
        +
        port - The remote port of the candidate.
        +
        Throws:
        +
        java.lang.NullPointerException - address is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesNetMarshalClient

        +
        public boolean matchesNetMarshalClient(NetMarshalClient toCheck)
        +
        Checks if this candidate matches an existing NetMarshalClient.
        +
        +
        Parameters:
        +
        toCheck - The client to check against.
        +
        Returns:
        +
        If the candidate matches the passed client.
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/FragmentationOptions.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/FragmentationOptions.html new file mode 100644 index 0000000..950ce3d --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/FragmentationOptions.html @@ -0,0 +1,462 @@ + + + + + +FragmentationOptions + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class FragmentationOptions

+
+
+ +
+
    +
  • +
    +
    +
    public final class FragmentationOptions
    +extends java.lang.Object
    +
    This class provides fragmentation options for using FragmentSenders and + FragmentReceivers in this package.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClient.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClient.html new file mode 100644 index 0000000..390cc2f --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClient.html @@ -0,0 +1,1069 @@ + + + + + +NetMarshalClient + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class NetMarshalClient

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    Direct Known Subclasses:
    +
    NetMarshalClientWrapped
    +
    +
    +
    +
    public class NetMarshalClient
    +extends java.lang.Object
    +implements java.io.Closeable
    +
    This class provides a managed way of networking on the client side. + NOTE: Methods that are synchronised are used here, do NOT use instances of these classes as monitors.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetMarshalClient

        +
        public NetMarshalClient(java.net.Socket socketIn,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +
        Constructs a new NetMarshalClient with the specified Socket, IPacketFactory, PacketLoader and FragmentationOptions.
        +
        +
        Parameters:
        +
        socketIn - The socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClient

        +
        public NetMarshalClient(java.net.MulticastSocket socketIn,
        +                        java.net.InetAddress multicastGroupAddress,
        +                        int multicastGroupPort,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +                 throws java.io.IOException
        +
        Constructs a new NetMarshalClient with the specified MulticastSocket, multicast group InetAddress, multicast port, IPacketFactory, PacketLoader and FragmentationOptions. + The MulticastSocket will join the multicast group.
        +
        +
        Parameters:
        +
        socketIn - The multicast socket to use.
        +
        multicastGroupAddress - The multicast group address.
        +
        multicastGroupPort - The multicast group port.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.io.IOException - There is an error joining or multicastGroupAddress is not a multicast address.
        +
        java.lang.NullPointerException - socketIn, multicastGroupAddress, factory or loader is null.
        +
        java.lang.IllegalArgumentException - multicastGroupPort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClient

        +
        public NetMarshalClient(java.net.DatagramSocket socketIn,
        +                        java.net.InetAddress remoteAddress,
        +                        int remotePort,
        +                        java.io.InputStream inputStream,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +
        Constructs a new NetMarshalClient with the specified DatagramSocket, remote InetAddress, remote port, InputStream, IPacketFactory, PacketLoader and FragmentationOptions.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        remoteAddress - The remote address to send data to.
        +
        remotePort - The remote port to send data to.
        +
        inputStream - The receiving input stream.
        +
        factory - The packet factory to use.
        +
        loader - The loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, remoteAddress, inputStream, factory or loader is null.
        +
        java.lang.IllegalArgumentException - remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClient

        +
        public NetMarshalClient(java.net.DatagramSocket socketIn,
        +                        java.net.InetAddress remoteAddress,
        +                        int remotePort,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +
        Constructs a new NetMarshalClient with the specified DatagramSocket, remote InetAddress, remote port, IPacketFactory, PacketLoader and FragmentationOptions.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        remoteAddress - The remote address to send data to.
        +
        remotePort - The remote port to send data to.
        +
        factory - The packet factory to use.
        +
        loader - The loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, remoteAddress, factory or loader is null.
        +
        java.lang.IllegalArgumentException - remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        open

        +
        public final void open()
        +
        Opens the marshal.
        +
      • +
      + + + +
        +
      • +

        getInputStream

        +
        public java.io.InputStream getInputStream()
        +
        Get the input stream.
        +
        +
        Returns:
        +
        Gets the input stream.
        +
        +
      • +
      + + + +
        +
      • +

        getRootInputStream

        +
        public java.io.InputStream getRootInputStream()
        +
        Get the root input stream.
        +
        +
        Returns:
        +
        Gets the root input stream.
        +
        +
      • +
      + + + +
        +
      • +

        getOutputStream

        +
        public java.io.OutputStream getOutputStream()
        +
        Get the output stream.
        +
        +
        Returns:
        +
        Gets the output stream.
        +
        +
      • +
      + + + +
        +
      • +

        getRootOutputStream

        +
        public java.io.OutputStream getRootOutputStream()
        +
        Get the root output stream.
        +
        +
        Returns:
        +
        Gets the root output stream.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketFactory

        +
        public IPacketFactory getPacketFactory()
        +
        Gets the packet factory in use.
        +
        +
        Returns:
        +
        The packet factory.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the packet loader in use.
        +
        +
        Returns:
        +
        The packet loader.
        +
        +
      • +
      + + + +
        +
      • +

        clearFragmentStorage

        +
        public final void clearFragmentStorage()
        +
        Clears the fragment storage registries if fragmentation is enabled. + WARNING: Use of this method is not recommended.
        +
      • +
      + + + +
        +
      • +

        localAddress

        +
        public java.net.InetAddress localAddress()
        +
        Get the local InetAddress.
        +
        +
        Returns:
        +
        The local address or null.
        +
        +
      • +
      + + + +
        +
      • +

        localPort

        +
        public int localPort()
        +
        Get the local port.
        +
        +
        Returns:
        +
        The local port or -1.
        +
        +
      • +
      + + + +
        +
      • +

        remoteAddress

        +
        public java.net.InetAddress remoteAddress()
        +
        Get the remote InetAddress.
        +
        +
        Returns:
        +
        The remote address.
        +
        +
      • +
      + + + +
        +
      • +

        remotePort

        +
        public int remotePort()
        +
        Get the remote port.
        +
        +
        Returns:
        +
        The remote port or -1.
        +
        +
      • +
      + + + +
        +
      • +

        isRunning

        +
        public final boolean isRunning()
        +
        Gets if the marshal is running.
        +
        +
        Returns:
        +
        If the marshal is running.
        +
        +
      • +
      + + + +
        +
      • +

        getFragmentationOptions

        +
        public FragmentationOptions getFragmentationOptions()
        +
        Gets the FragmentationOptions of the client.
        +
        +
        Returns:
        +
        The fragmentation options or null if fragmentation is disabled.
        +
        +
      • +
      + + + +
        +
      • +

        isSSLUpgraded

        +
        public final boolean isSSLUpgraded()
        +
        Gets if the marshal is ssl upgraded.
        +
        +
        Returns:
        +
        Is the marshal ssl upgraded.
        +
        +
      • +
      + + + +
        +
      • +

        sendPacket

        +
        public final void sendPacket(IPacket packetIn,
        +                             boolean directSend)
        +                      throws java.io.IOException,
        +                             PacketException
        +
        Sends a IPacket.
        +
        +
        Parameters:
        +
        packetIn - The packet to send.
        +
        directSend - Whether the packet should be sent directly or through the fragmentation system.
        +
        Throws:
        +
        java.io.IOException - A stream exception has occurred.
        +
        PacketException - An exception has occurred.
        +
        java.lang.NullPointerException - packetIn is null.
        +
        +
      • +
      + + + +
        +
      • +

        flush

        +
        public final void flush()
        +                 throws java.io.IOException
        +
        Flushes the output streams.
        +
        +
        Throws:
        +
        java.io.IOException - A stream exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        areReceivedPacketsWaiting

        +
        public boolean areReceivedPacketsWaiting()
        +
        Gets if there are received IPackets.
        +
        +
        Returns:
        +
        If there are received packets.
        +
        +
      • +
      + + + +
        +
      • +

        receivePacket

        +
        public IPacket receivePacket()
        +                      throws java.lang.InterruptedException
        +
        Receives a IPacket.
        +
        +
        Returns:
        +
        The received packet.
        +
        Throws:
        +
        java.lang.InterruptedException - A thread interruption has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        receivePacketPolled

        +
        public IPacket receivePacketPolled()
        +
        Receives a IPacket polled.
        +
        +
        Returns:
        +
        The received packet.
        +
        +
      • +
      + + + +
        +
      • +

        arePacketsBeingRead

        +
        public boolean arePacketsBeingRead()
        +
        Are IPackets being read.
        +
        +
        Returns:
        +
        Are packets being read.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketsShouldBeRead

        +
        public void setPacketsShouldBeRead(boolean shouldRead)
        +
        Set if IPackets should be read.
        +
        +
        Parameters:
        +
        shouldRead - Should packets be read.
        +
        +
      • +
      + + + +
        +
      • +

        sslUpgradeServerSide

        +
        public void sslUpgradeServerSide(javax.net.ssl.SSLContext context)
        +                          throws SSLUtilityException,
        +                                 java.io.IOException
        +
        Performs SSL socket upgrades on server side (Use for accepted sockets). + Can only be called when setPacketsShouldBeRead(boolean) is set to false or in a BiConsumer + consumer for setReceiveBiConsumer(BiConsumer).
        +
        +
        Parameters:
        +
        context - The SSL context to use.
        +
        Throws:
        +
        SSLUtilityException - An SSL Utility exception has occurred.
        +
        java.io.IOException - An I/O Exception has occurred.
        +
        java.lang.NullPointerException - context is null.
        +
        java.lang.IllegalStateException - sslUpgrade methods should be called in a BiConsumer (for setReceiveBiConsumer) + within the target NetMarshalClient or when reading packets (arePacketsBeingRead) is disabled on the NetMarshalClient.
        +
        +
      • +
      + + + +
        +
      • +

        sslUpgradeClientSide

        +
        public void sslUpgradeClientSide(javax.net.ssl.SSLContext context,
        +                                 java.lang.String remoteHostName)
        +                          throws SSLUtilityException,
        +                                 java.io.IOException
        +
        Performs SSL socket upgrades on client side (Use for constructed sockets). + Can only be called when setPacketsShouldBeRead(boolean) is set to false or in a BiConsumer + consumer for setReceiveBiConsumer(BiConsumer).
        +
        +
        Parameters:
        +
        context - The SSL context to use.
        +
        remoteHostName - The hostname of the remote server.
        +
        Throws:
        +
        SSLUtilityException - An SSL Utility exception has occurred.
        +
        java.io.IOException - An I/O Exception has occurred.
        +
        java.lang.NullPointerException - context or remoteHostName is null.
        +
        java.lang.IllegalStateException - sslUpgrade methods should be called in a BiConsumer (for setReceiveBiConsumer) + within the target NetMarshalClient or when reading packets (arePacketsBeingRead) is disabled on the NetMarshalClient.
        +
        +
      • +
      + + + +
        +
      • +

        getReceiveBiConsumer

        +
        public java.util.function.BiConsumer<IPacket,NetMarshalClient> getReceiveBiConsumer()
        +
        Gets the BiConsumer receiver consumer. + WARNING: Calling sendPacket(IPacket, boolean) or flush() could cause full buffer hangs.
        +
        +
        Returns:
        +
        The receiver consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setReceiveBiConsumer

        +
        public void setReceiveBiConsumer(java.util.function.BiConsumer<IPacket,NetMarshalClient> consumer)
        +
        Sets the BiConsumer receiver consumer. + WARNING: Calling sendPacket(IPacket, boolean) or flush() could cause full buffer hangs.
        +
        +
        Parameters:
        +
        consumer - The new receiver consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getReceiveExceptionBiConsumer

        +
        public java.util.function.BiConsumer<java.lang.Exception,NetMarshalClient> getReceiveExceptionBiConsumer()
        +
        Gets the BiConsumer receive exception consumer.
        +
        +
        Returns:
        +
        The exception consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setReceiveExceptionBiConsumer

        +
        public void setReceiveExceptionBiConsumer(java.util.function.BiConsumer<java.lang.Exception,NetMarshalClient> consumer)
        +
        Sets the BiConsumer receive exception consumer.
        +
        +
        Parameters:
        +
        consumer - The new exception consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getClosedConsumer

        +
        public java.util.function.Consumer<NetMarshalClient> getClosedConsumer()
        +
        Gets the Consumer closed consumer.
        +
        +
        Returns:
        +
        The closed consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setClosedConsumer

        +
        public void setClosedConsumer(java.util.function.Consumer<NetMarshalClient> consumer)
        +
        Sets the Consumer closed consumer.
        +
        +
        Parameters:
        +
        consumer - The new closed consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public final void close()
        +                 throws java.io.IOException
        +
        Closes the marshal, closing all its streams.
        +
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Throws:
        +
        java.io.IOException - An I/O Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClientWrapped.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClientWrapped.html new file mode 100644 index 0000000..f05049a --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalClientWrapped.html @@ -0,0 +1,491 @@ + + + + + +NetMarshalClientWrapped + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class NetMarshalClientWrapped

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    +
    public class NetMarshalClientWrapped
    +extends NetMarshalClient
    +
    This class provides a managed way of networking on the client side, allows stream wrapping. + Wrapped streams should close the underlying stream when closed. + NOTE: Methods that are synchronised are used here, do NOT use instances of these classes as monitors.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetMarshalClientWrapped

        +
        public NetMarshalClientWrapped(java.net.Socket socketIn,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +
        Constructs a new NetMarshalClientWrapped with the specified Socket, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream. + Wrapped streams should close the underlying stream when closed.
        +
        +
        Parameters:
        +
        socketIn - The socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClientWrapped

        +
        public NetMarshalClientWrapped(java.net.MulticastSocket socketIn,
        +                               java.net.InetAddress multicastGroupAddress,
        +                               int multicastGroupPort,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +                        throws java.io.IOException
        +
        Constructs a new NetMarshalClientWrapped with the specified MulticastSocket, multicast group InetAddress, multicast port, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream. + The MulticastSocket will join the multicast group. + Wrapped streams should close the underlying stream when closed.
        +
        +
        Parameters:
        +
        socketIn - The multicast socket to use.
        +
        multicastGroupAddress - The multicast group address.
        +
        multicastGroupPort - The multicast group port.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.io.IOException - There is an error joining or multicastGroupAddress is not a multicast address.
        +
        java.lang.NullPointerException - socketIn, multicastGroupAddress, factory or loader is null.
        +
        java.lang.IllegalArgumentException - multicastGroupPort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClientWrapped

        +
        public NetMarshalClientWrapped(java.net.DatagramSocket socketIn,
        +                               java.net.InetAddress remoteAddress,
        +                               int remotePort,
        +                               java.io.InputStream inputStream,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +
        Constructs a new NetMarshalClientWrapped with the specified DatagramSocket, remote InetAddress, remote port, InputStream, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream. + Wrapped streams should close the underlying stream when closed.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        remoteAddress - The remote address to send data to.
        +
        remotePort - The remote port to send data to.
        +
        inputStream - The receiving input stream.
        +
        factory - The packet factory to use.
        +
        loader - The loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, remoteAddress, inputStream, factory or loader is null.
        +
        java.lang.IllegalArgumentException - remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalClientWrapped

        +
        public NetMarshalClientWrapped(java.net.DatagramSocket socketIn,
        +                               java.net.InetAddress remoteAddress,
        +                               int remotePort,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +
        Constructs a new NetMarshalClientWrapped with the specified DatagramSocket, remote InetAddress, remote port, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream. + Wrapped streams should close the underlying stream when closed.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        remoteAddress - The remote address to send data to.
        +
        remotePort - The remote port to send data to.
        +
        factory - The packet factory to use.
        +
        loader - The loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, remoteAddress, factory or loader is null.
        +
        java.lang.IllegalArgumentException - remotePort is less than 0 or greater than 65535 or fragmentation options failed validation.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getWrapperInputStream

        +
        public java.util.function.Function<java.io.InputStream,java.io.InputStream> getWrapperInputStream()
        +
        Gets the Function input stream wrapper function.
        +
        +
        Returns:
        +
        The input stream wrapper function or null.
        +
        +
      • +
      + + + +
        +
      • +

        getWrapperOutputStream

        +
        public java.util.function.Function<java.io.OutputStream,java.io.OutputStream> getWrapperOutputStream()
        +
        Gets the Function output stream wrapper function.
        +
        +
        Returns:
        +
        The output stream wrapper function or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServer.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServer.html new file mode 100644 index 0000000..710e0de --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServer.html @@ -0,0 +1,902 @@ + + + + + +NetMarshalServer + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class NetMarshalServer

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    Direct Known Subclasses:
    +
    NetMarshalServerWrapped
    +
    +
    +
    +
    public class NetMarshalServer
    +extends java.lang.Object
    +implements java.io.Closeable
    +
    This class provides a way of networking on the server side and holds a collection of NetMarshalClients. + NOTE: Methods that are synchronised are used here, do NOT use instances of these classes as monitors.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetMarshalServer

        +
        public NetMarshalServer(java.net.ServerSocket socketIn,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +
        Constructs a new NetMarshalServer with the specified ServerSocket, IPacketFactory, PacketLoader and FragmentationOptions.
        +
        +
        Parameters:
        +
        socketIn - The server socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalServer

        +
        public NetMarshalServer(java.net.DatagramSocket socketIn,
        +                        IPacketFactory factory,
        +                        PacketLoader loader,
        +                        FragmentationOptions fragmentationOptions)
        +
        Constructs a new NetMarshalServer with the specified DatagramSocket, IPacketFactory, PacketLoader and FragmentationOptions.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        open

        +
        public final void open()
        +
        Opens the marshal.
        +
      • +
      + + + +
        +
      • +

        getPacketFactory

        +
        public IPacketFactory getPacketFactory()
        +
        Gets the packet factory in use.
        +
        +
        Returns:
        +
        The packet factory.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the packet loader in use.
        +
        +
        Returns:
        +
        The packet loader.
        +
        +
      • +
      + + + +
        +
      • +

        localAddress

        +
        public java.net.InetAddress localAddress()
        +
        Get the local InetAddress.
        +
        +
        Returns:
        +
        The local address or null.
        +
        +
      • +
      + + + +
        +
      • +

        localPort

        +
        public int localPort()
        +
        Get the local port.
        +
        +
        Returns:
        +
        The local port or -1.
        +
        +
      • +
      + + + +
        +
      • +

        isRunning

        +
        public final boolean isRunning()
        +
        Gets if the marshal is running.
        +
        +
        Returns:
        +
        If the marshal is running.
        +
        +
      • +
      + + + +
        +
      • +

        getFragmentationOptions

        +
        public FragmentationOptions getFragmentationOptions()
        +
        Gets the FragmentationOptions of the client.
        +
        +
        Returns:
        +
        The fragmentation options or null if fragmentation is disabled.
        +
        +
      • +
      + + + +
        +
      • +

        getConnectedClients

        +
        public final NetMarshalClient[] getConnectedClients()
        +
        Gets the current set of connected NetMarshalClients.
        +
        +
        Returns:
        +
        An array of connected clients.
        +
        +
      • +
      + + + +
        +
      • +

        broadcastPacket

        +
        public final void broadcastPacket(IPacket packetIn,
        +                                  boolean directSend)
        +                           throws java.io.IOException,
        +                                  PacketException
        +
        Broadcasts a IPacket.
        +
        +
        Parameters:
        +
        packetIn - The packet to broadcast.
        +
        directSend - Whether the packet should be sent directly or through the fragmentation system.
        +
        Throws:
        +
        java.io.IOException - A stream exception has occurred.
        +
        PacketException - An exception has occurred.
        +
        java.lang.NullPointerException - packetIn is null.
        +
        +
      • +
      + + + +
        +
      • +

        flush

        +
        public final void flush()
        +                 throws java.io.IOException
        +
        Flushes all the output streams on all the clients.
        +
        +
        Throws:
        +
        java.io.IOException - A stream exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        disconnectAll

        +
        public final void disconnectAll()
        +                         throws java.io.IOException
        +
        Disconnects all the clients (By closing them).
        +
        +
        Throws:
        +
        java.io.IOException - An I/O Exception has occurred.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        setReceiveBiConsumer

        +
        public void setReceiveBiConsumer(java.util.function.BiConsumer<IPacket,NetMarshalClient> consumer)
        +
        Sets the BiConsumer receiver consumer. + WARNING: Calling broadcastPacket(IPacket, boolean) or flush() could cause full buffer hangs.
        +
        +
        Parameters:
        +
        consumer - The new receiver consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getReceiveExceptionBiConsumer

        +
        public java.util.function.BiConsumer<java.lang.Exception,NetMarshalClient> getReceiveExceptionBiConsumer()
        +
        Gets the BiConsumer receive exception consumer.
        +
        +
        Returns:
        +
        The exception consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setReceiveExceptionBiConsumer

        +
        public void setReceiveExceptionBiConsumer(java.util.function.BiConsumer<java.lang.Exception,NetMarshalClient> consumer)
        +
        Sets the BiConsumer receive exception consumer.
        +
        +
        Parameters:
        +
        consumer - The new exception consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getAcceptExceptionBiConsumer

        +
        public java.util.function.BiConsumer<java.lang.Exception,NetMarshalServer> getAcceptExceptionBiConsumer()
        +
        Gets the BiConsumer accept exception consumer.
        +
        +
        Returns:
        +
        The exception consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setAcceptExceptionBiConsumer

        +
        public void setAcceptExceptionBiConsumer(java.util.function.BiConsumer<java.lang.Exception,NetMarshalServer> consumer)
        +
        Sets the BiConsumer accept exception consumer.
        +
        +
        Parameters:
        +
        consumer - The new exception consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getClosedConsumer

        +
        public java.util.function.Consumer<NetMarshalClient> getClosedConsumer()
        +
        Gets the Consumer closed consumer.
        +
        +
        Returns:
        +
        The closed consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setClosedConsumer

        +
        public void setClosedConsumer(java.util.function.Consumer<NetMarshalClient> consumer)
        +
        Sets the Consumer closed consumer.
        +
        +
        Parameters:
        +
        consumer - The new closed consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getOpenedConsumer

        +
        public java.util.function.Consumer<NetMarshalClient> getOpenedConsumer()
        +
        Gets the Consumer opened consumer.
        +
        +
        Returns:
        +
        The opened consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setOpenedConsumer

        +
        public void setOpenedConsumer(java.util.function.Consumer<NetMarshalClient> consumer)
        +
        Sets the Consumer opened consumer.
        +
        +
        Parameters:
        +
        consumer - The new opened consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getClientAcceptanceBiConsumer

        +
        public java.util.function.BiConsumer<CandidateClient,NetMarshalServer> getClientAcceptanceBiConsumer()
        +
        Gets the BiConsumer client acceptance consumer. + Use CandidateClient.accept to declare whether the candidate should be accepted.
        +
        +
        Returns:
        +
        The acceptance consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setClientAcceptanceBiConsumer

        +
        public void setClientAcceptanceBiConsumer(java.util.function.BiConsumer<CandidateClient,NetMarshalServer> consumer)
        +
        Sets the BiConsumer client acceptance consumer. + Use CandidateClient.accept to declare whether the candidate should be accepted.
        +
        +
        Parameters:
        +
        consumer - The new acceptance consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        getSocketSetupBiConsumer

        +
        public java.util.function.BiConsumer<java.net.Socket,NetMarshalServer> getSocketSetupBiConsumer()
        +
        Gets the BiConsumer socket setup consumer.
        +
        +
        Returns:
        +
        The setup consumer or null.
        +
        +
      • +
      + + + +
        +
      • +

        setSocketSetupBiConsumer

        +
        public void setSocketSetupBiConsumer(java.util.function.BiConsumer<java.net.Socket,NetMarshalServer> consumer)
        +
        Sets the BiConsumer socket setup consumer.
        +
        +
        Parameters:
        +
        consumer - The new setup consumer.
        +
        Throws:
        +
        java.lang.NullPointerException - consumer is null.
        +
        +
      • +
      + + + +
        +
      • +

        connect

        +
        public final NetMarshalClient connect(java.net.InetAddress remoteAddress,
        +                                      int remotePort,
        +                                      int timeout)
        +                               throws java.io.IOException
        +
        Connects to a remote endpoint.
        +
        +
        Parameters:
        +
        remoteAddress - The remote address to connect to.
        +
        remotePort - The remote port to connect to.
        +
        timeout - The timeout of the connection attempt (0 for infinite timeout).
        +
        Returns:
        +
        A NetMarshalClient instance or null for non-accepted connection.
        +
        Throws:
        +
        java.io.IOException - A connection error has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public final void close()
        +                 throws java.io.IOException
        +
        Closes the marshal, closing all the connected clients.
        +
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Throws:
        +
        java.io.IOException - An I/O Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServerWrapped.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServerWrapped.html new file mode 100644 index 0000000..840bf05 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/NetMarshalServerWrapped.html @@ -0,0 +1,385 @@ + + + + + +NetMarshalServerWrapped + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.marshal
+

Class NetMarshalServerWrapped

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    +
    public class NetMarshalServerWrapped
    +extends NetMarshalServer
    +
    This class provides a way of networking on the server side and holds a collection of NetMarshalClients, allows stream wrapping. + Wrapped streams should close the underlying stream when closed. + NOTE: Methods that are synchronised are used here, do NOT use instances of these classes as monitors.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetMarshalServerWrapped

        +
        public NetMarshalServerWrapped(java.net.ServerSocket socketIn,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +
        Constructs a new NetMarshalServerWrapped with the specified ServerSocket, IPacketFactory, PacketLoader, FragmentationOptions, + Function for wrapping the input stream and the Function for wrapping the output stream.
        +
        +
        Parameters:
        +
        socketIn - The server socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      + + + +
        +
      • +

        NetMarshalServerWrapped

        +
        public NetMarshalServerWrapped(java.net.DatagramSocket socketIn,
        +                               IPacketFactory factory,
        +                               PacketLoader loader,
        +                               FragmentationOptions fragmentationOptions,
        +                               java.util.function.Function<java.io.InputStream,java.io.InputStream> inputStreamWrapper,
        +                               java.util.function.Function<java.io.OutputStream,java.io.OutputStream> outputStreamWrapper)
        +
        Constructs a new NetMarshalServerWrapped with the specified DatagramSocket, IPacketFactory, PacketLoader, FragmentationOptions, + Function for wrapping the input stream and the Function for wrapping the output stream.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        factory - The packet factory to use.
        +
        loader - The packet loader to use.
        +
        fragmentationOptions - The fragmentation options, null to disable fragmentation.
        +
        inputStreamWrapper - The input stream wrapper to use (Can be null).
        +
        outputStreamWrapper - The output stream wrapper to use (Can be null).
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn, factory or loader is null.
        +
        java.lang.IllegalArgumentException - Fragmentation options failed validation.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getWrapperInputStream

        +
        public java.util.function.Function<java.io.InputStream,java.io.InputStream> getWrapperInputStream()
        +
        Gets the Function input stream wrapper function.
        +
        +
        Returns:
        +
        The input stream wrapper function or null.
        +
        +
      • +
      + + + +
        +
      • +

        getWrapperOutputStream

        +
        public java.util.function.Function<java.io.OutputStream,java.io.OutputStream> getWrapperOutputStream()
        +
        Gets the Function output stream wrapper function.
        +
        +
        Returns:
        +
        The output stream wrapper function or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-frame.html new file mode 100644 index 0000000..05dc12e --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-frame.html @@ -0,0 +1,25 @@ + + + + + +com.captainalm.lib.calmnet.marshal + + + + + +

com.captainalm.lib.calmnet.marshal

+
+

Classes

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-summary.html new file mode 100644 index 0000000..ea34f90 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-summary.html @@ -0,0 +1,186 @@ + + + + + +com.captainalm.lib.calmnet.marshal + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.marshal

+
+
This package contains the network marshals for managed sending of IPackets on sockets.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.marshal Description

+
This package contains the network marshals for managed sending of IPackets on sockets.
+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/marshal/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-tree.html new file mode 100644 index 0000000..f35d293 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/marshal/package-tree.html @@ -0,0 +1,146 @@ + + + + + +com.captainalm.lib.calmnet.marshal Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.marshal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/IAcknowledgement.html b/JavaDoc/com/captainalm/lib/calmnet/packet/IAcknowledgement.html new file mode 100644 index 0000000..6e3791c --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/IAcknowledgement.html @@ -0,0 +1,235 @@ + + + + + +IAcknowledgement + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Interface IAcknowledgement

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isAcknowledgement

        +
        boolean isAcknowledgement()
        +
        Gets if the class instance is an Acknowledgement.
        +
        +
        Returns:
        +
        If the class instance is an Acknowledgement.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/IInternalCache.html b/JavaDoc/com/captainalm/lib/calmnet/packet/IInternalCache.html new file mode 100644 index 0000000..a5b7591 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/IInternalCache.html @@ -0,0 +1,256 @@ + + + + + +IInternalCache + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Interface IInternalCache

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    EncryptedPacket, NetworkEncryptionCipherPacket
    +
    +
    +
    +
    public interface IInternalCache
    +
    This interface allows getting and setting if the + internal cache should be used within a class instance.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isCacheUsed

        +
        boolean isCacheUsed()
        +
        Gets if the internal cache is used.
        +
        +
        Returns:
        +
        If the internal cache is used.
        +
        +
      • +
      + + + +
        +
      • +

        setCacheUsed

        +
        void setCacheUsed(boolean used)
        +
        Sets if the internal cache is used.
        +
        +
        Parameters:
        +
        used - If the internal cache is used.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/IPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/IPacket.html new file mode 100644 index 0000000..98e4df3 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/IPacket.html @@ -0,0 +1,306 @@ + + + + + +IPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Interface IPacket

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + +
        +
      • +

        getProtocol

        +
        PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        byte[] savePayload()
        +            throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        void loadPayload(byte[] packetData)
        +          throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/IStreamedPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/IStreamedPacket.html new file mode 100644 index 0000000..e1a9078 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/IStreamedPacket.html @@ -0,0 +1,306 @@ + + + + + +IStreamedPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Interface IStreamedPacket

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        readData

        +
        void readData(java.io.OutputStream outputStream)
        +       throws java.io.IOException,
        +              PacketException
        +
        Reads payload data to an OutputStream.
        +
        +
        Parameters:
        +
        outputStream - The output stream to read data to.
        +
        Throws:
        +
        java.lang.NullPointerException - outputStream is null.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writeData

        +
        void writeData(java.io.InputStream inputStream,
        +               int size)
        +        throws java.io.IOException,
        +               PacketException
        +
        Writes payload data from an InputStream.
        +
        +
        Parameters:
        +
        inputStream - The input stream to write data from.
        +
        size - The size of the input payload in bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - size is less than 0.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSize

        +
        int getSize()
        +     throws PacketException
        +
        Gets the size of the output data.
        +
        +
        Returns:
        +
        The size of the output data in bytes.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/PacketException.html b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketException.html new file mode 100644 index 0000000..5c9670c --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketException.html @@ -0,0 +1,336 @@ + + + + + +PacketException + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Class PacketException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public class PacketException
    +extends java.lang.Exception
    +
    This class provides the packet exception wrapper class. + See Throwable.getCause() to find out the underlying exception.
    +
    +
    Author:
    +
    Captain ALM
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      PacketException(java.lang.String message) +
      Constructs a new exception with the specified detail message.
      +
      PacketException(java.lang.String message, + java.lang.Throwable cause) +
      Constructs a new exception with the specified detail message and + cause.
      +
      PacketException(java.lang.Throwable cause) +
      Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause).
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PacketException

        +
        public PacketException(java.lang.String message)
        +
        Constructs a new exception with the specified detail message. The + cause is not initialized, and may subsequently be initialized by + a call to Throwable.initCause(java.lang.Throwable).
        +
        +
        Parameters:
        +
        message - the detail message. The detail message is saved for + later retrieval by the Throwable.getMessage() method.
        +
        +
      • +
      + + + +
        +
      • +

        PacketException

        +
        public PacketException(java.lang.String message,
        +                       java.lang.Throwable cause)
        +
        Constructs a new exception with the specified detail message and + cause.

        Note that the detail message associated with + cause is not automatically incorporated in + this exception's detail message.

        +
        +
        Parameters:
        +
        message - the detail message (which is saved for later retrieval + by the Throwable.getMessage() method).
        +
        cause - the cause (which is saved for later retrieval by the + Throwable.getCause() method). (A null value is + permitted, and indicates that the cause is nonexistent or + unknown.)
        +
        Since:
        +
        1.4
        +
        +
      • +
      + + + +
        +
      • +

        PacketException

        +
        public PacketException(java.lang.Throwable cause)
        +
        Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause). + This constructor is useful for exceptions that are little more than + wrappers for other throwables (for example, PrivilegedActionException).
        +
        +
        Parameters:
        +
        cause - the cause (which is saved for later retrieval by the + Throwable.getCause() method). (A null value is + permitted, and indicates that the cause is nonexistent or + unknown.)
        +
        Since:
        +
        1.4
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/PacketLoader.html b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketLoader.html new file mode 100644 index 0000000..6b0d039 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketLoader.html @@ -0,0 +1,811 @@ + + + + + +PacketLoader + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Class PacketLoader

+
+
+ +
+
    +
  • +
    +
    +
    public class PacketLoader
    +extends java.lang.Object
    +
    This class provides the ability to load and save IPacket + to InputStream and OutputStream. + Packets can have contents checking support using DigestProvider.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PacketLoader

        +
        public PacketLoader()
        +
        Constructs a new Packet loader instance. + If using a digest provider, use PacketLoader(DigestProvider)
        +
      • +
      + + + +
        +
      • +

        PacketLoader

        +
        public PacketLoader(com.captainalm.lib.stdcrypt.digest.DigestProvider provider)
        +
        Constructs a new Packet loader instance with the specified DigestProvider. + If using a digest provider, make sure all endpoints use the same algorithm; + if null, no trailer is created or expected; + this is ignored if saving / loading packets from byte arrays.
        +
        +
        Parameters:
        +
        provider - The digest provider or null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHashProvider

        +
        public com.captainalm.lib.stdcrypt.digest.DigestProvider getHashProvider()
        +
        This field provides the DigestProvider to use for the payload of the packets on the trailer.
        +
        +
        Returns:
        +
        The digest provider in use or null.
        +
        +
      • +
      + + + +
        +
      • +

        areInvalidPacketsAllowed

        +
        public boolean areInvalidPacketsAllowed()
        +
        Gets whether invalid packets are allowed to be read and written.
        +
        +
        Returns:
        +
        If invalid packets can be processed.
        +
        +
      • +
      + + + +
        +
      • +

        setAllowInvalidPackets

        +
        public void setAllowInvalidPackets(boolean allowInvalidPackets)
        +
        This sets whether invalid packets are allowed to be read and written.
        +
        +
        Parameters:
        +
        allowInvalidPackets - If invalid packets can be processed.
        +
        +
      • +
      + + + +
        +
      • +

        readPacketNoDigest

        +
        public IPacket readPacketNoDigest(byte[] arrayIn,
        +                                  IPacketFactory factory,
        +                                  PacketProtocolInformation information)
        +                           throws PacketException
        +
        Reads a IPacket from a byte array (No digest support). + If the information parameter is null, this is obtained as part of the reading. + NOTE: The getHashProvider() for digests is NOT supported and no digest is expected for these packets.
        +
        +
        Parameters:
        +
        arrayIn - The byte array for reading.
        +
        factory - The IPacketFactory to use to generate packets.
        +
        information - The protocol information or null.
        +
        Returns:
        +
        The loaded packet or null.
        +
        Throws:
        +
        java.lang.NullPointerException - The arrayIn or the factory is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readPacket

        +
        public IPacket readPacket(java.io.InputStream inputStream,
        +                          IPacketFactory factory,
        +                          PacketProtocolInformation information)
        +                   throws java.io.IOException,
        +                          PacketException
        +
        Reads a IPacket from an input stream. + If the information parameter is null, this is obtained as part of the reading.
        +
        +
        Parameters:
        +
        inputStream - The input stream for reading.
        +
        factory - The IPacketFactory to use to generate packets.
        +
        information - The protocol information or null.
        +
        Returns:
        +
        The loaded packet or null.
        +
        Throws:
        +
        java.lang.NullPointerException - The inputStream or the factory is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readPacketNoDigest

        +
        public IPacket readPacketNoDigest(java.io.InputStream inputStream,
        +                                  IPacketFactory factory,
        +                                  PacketProtocolInformation information)
        +                           throws java.io.IOException,
        +                                  PacketException
        +
        Reads a IPacket from an input stream (No digest support). + If the information parameter is null, this is obtained as part of the reading. + NOTE: The getHashProvider() for digests is NOT supported and no digest is expected for these packets.
        +
        +
        Parameters:
        +
        inputStream - The input stream for reading.
        +
        factory - The IPacketFactory to use to generate packets.
        +
        information - The protocol information or null.
        +
        Returns:
        +
        The loaded packet or null.
        +
        Throws:
        +
        java.lang.NullPointerException - The inputStream or the factory is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readStreamedPacket

        +
        public IPacket readStreamedPacket(java.io.InputStream inputStream,
        +                                  IPacketFactory factory,
        +                                  PacketProtocolInformation information)
        +                           throws java.io.IOException,
        +                                  PacketException
        +
        Reads a IStreamedPacket from an input stream. + If the information parameter is null, this is obtained as part of the reading. + NOTE: The packet may be an IPacket if no stream packet is available for that protocol.
        +
        +
        Parameters:
        +
        inputStream - The input stream for reading.
        +
        factory - The IPacketFactory to use to generate packets.
        +
        information - The protocol information or null.
        +
        Returns:
        +
        The loaded packet or null.
        +
        Throws:
        +
        java.lang.NullPointerException - The inputStream or the factory is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readStreamedPacketNoDigest

        +
        public IPacket readStreamedPacketNoDigest(java.io.InputStream inputStream,
        +                                          IPacketFactory factory,
        +                                          PacketProtocolInformation information)
        +                                   throws java.io.IOException,
        +                                          PacketException
        +
        Reads a IStreamedPacket from an input stream (No digest support). + If the information parameter is null, this is obtained as part of the reading. + NOTE: The packet may be an IPacket if no stream packet is available for that protocol. + NOTE: The getHashProvider() for digests is NOT supported and no digest is expected for these packets.
        +
        +
        Parameters:
        +
        inputStream - The input stream for reading.
        +
        factory - The IPacketFactory to use to generate packets.
        +
        information - The protocol information or null.
        +
        Returns:
        +
        The loaded packet or null.
        +
        Throws:
        +
        java.lang.NullPointerException - The inputStream or the factory is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writePacketNoDigest

        +
        public byte[] writePacketNoDigest(IPacket packet,
        +                                  boolean writeInformation)
        +                           throws PacketException
        +
        Returns a IPacket to a byte array (No digest support). + NOTE: The getHashProvider() for digests is NOT supported and no digest is expected for these packets.
        +
        +
        Parameters:
        +
        packet - The packet to save.
        +
        writeInformation - Write the PacketProtocolInformation to the beginning of the array.
        +
        Throws:
        +
        java.lang.NullPointerException - A parameter is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writePacket

        +
        public void writePacket(java.io.OutputStream outputStream,
        +                        IPacket packet,
        +                        boolean writeInformation)
        +                 throws java.io.IOException,
        +                        PacketException
        +
        Writes a IPacket to an output stream (No digest support).
        +
        +
        Parameters:
        +
        outputStream - The output stream for writing.
        +
        packet - The packet to save.
        +
        writeInformation - Write the PacketProtocolInformation to the stream.
        +
        Throws:
        +
        java.lang.NullPointerException - A parameter is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writePacketNoDigest

        +
        public void writePacketNoDigest(java.io.OutputStream outputStream,
        +                                IPacket packet,
        +                                boolean writeInformation)
        +                         throws java.io.IOException,
        +                                PacketException
        +
        Writes a IPacket to an output stream. + NOTE: The getHashProvider() for digests is NOT supported and no digest is expected for these packets.
        +
        +
        Parameters:
        +
        outputStream - The output stream for writing.
        +
        packet - The packet to save.
        +
        writeInformation - Write the PacketProtocolInformation to the stream.
        +
        Throws:
        +
        java.lang.NullPointerException - A parameter is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readInteger

        +
        public static int readInteger(java.io.InputStream inputStream)
        +                       throws java.io.IOException
        +
        Reads an Integer from an InputStream.
        +
        +
        Parameters:
        +
        inputStream - The input stream to use.
        +
        Returns:
        +
        The integer that was stored.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.io.IOException - An I/O error has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writeInteger

        +
        public static void writeInteger(java.io.OutputStream outputStream,
        +                                int i)
        +                         throws java.io.IOException
        +
        Writes an Integer to the OutputStream using 4 bytes.
        +
        +
        Parameters:
        +
        outputStream - The output stream to use.
        +
        i - The integer to store.
        +
        Throws:
        +
        java.lang.NullPointerException - outputStream is null.
        +
        java.lang.IllegalArgumentException - i is less than 0.
        +
        java.io.IOException - An I/O error has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readByteFromInputStream

        +
        public static byte readByteFromInputStream(java.io.InputStream inputStream)
        +                                    throws java.io.IOException
        +
        Reads a byte from an InputStream.
        +
        +
        Parameters:
        +
        inputStream - The input stream to read from.
        +
        Returns:
        +
        The byte read.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.io.IOException - An I/O error has occurred or end of stream has been reached.
        +
        +
      • +
      + + + +
        +
      • +

        readArrayFromInputStream

        +
        public static byte[] readArrayFromInputStream(java.io.InputStream inputStream,
        +                                              int length)
        +                                       throws java.io.IOException
        +
        Reads in a byte array of a specified length from an InputStream.
        +
        +
        Parameters:
        +
        inputStream - The input stream to read from.
        +
        length - The length of the stream.
        +
        Returns:
        +
        The array of read bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - length is less than 0.
        +
        java.io.IOException - An I/O error occurs or end of stream has been reached.
        +
        +
      • +
      + + + +
        +
      • +

        getByteArrayFromInteger

        +
        public static byte[] getByteArrayFromInteger(int i)
        +
        Saves an Integer into a byte array.
        +
        +
        Parameters:
        +
        i - The integer to save.
        +
        Returns:
        +
        The byte array.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - i is less than 0.
        +
        +
      • +
      + + + +
        +
      • +

        getIntegerFromByteArray

        +
        public static int getIntegerFromByteArray(byte[] bytes)
        +
        Loads an Integer from a byte array.
        +
        +
        Parameters:
        +
        bytes - The byte array.
        +
        Returns:
        +
        The integer.
        +
        Throws:
        +
        java.lang.NullPointerException - bytes is null.
        +
        java.lang.IllegalArgumentException - bytes length is not 4.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketSize

        +
        public int getPacketSize(IPacket packet,
        +                         boolean includeInformation,
        +                         boolean ignoreDigest)
        +                  throws PacketException
        +
        Gets the total size of a written packet in bytes.
        +
        +
        Parameters:
        +
        packet - The packet to check.
        +
        includeInformation - If the 2 byte information header is included.
        +
        ignoreDigest - If the digest length should be ignored if available.
        +
        Returns:
        +
        The size of the packet in bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - packet is null.
        +
        PacketException - A Packet Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/PacketProtocolInformation.html b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketProtocolInformation.html new file mode 100644 index 0000000..80829a4 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/PacketProtocolInformation.html @@ -0,0 +1,426 @@ + + + + + +PacketProtocolInformation + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet
+

Class PacketProtocolInformation

+
+
+ +
+
    +
  • +
    +
    +
    public class PacketProtocolInformation
    +extends java.lang.Object
    +
    This class provides the packet protocol information for IPacket.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PacketProtocolInformation

        +
        public PacketProtocolInformation()
        +
        Constructs a new instance of PacketProtocolInformation. + This is set to 0 Major, 0 Minor.
        +
      • +
      + + + +
        +
      • +

        PacketProtocolInformation

        +
        public PacketProtocolInformation(byte major,
        +                                 byte minor)
        +
        Constructs a new instance of PacketProtocolInformation.
        +
        +
        Parameters:
        +
        major - The major version.
        +
        minor - The minor version.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getMajor

        +
        public int getMajor()
        +
        Gets the major protocol for the packet.
        +
        +
        Returns:
        +
        The major protocol.
        +
        +
      • +
      + + + +
        +
      • +

        getMinor

        +
        public int getMinor()
        +
        Gets the minor protocol for the packet.
        +
        +
        Returns:
        +
        The minor protocol.
        +
        +
      • +
      + + + +
        +
      • +

        getProtocolInformation

        +
        public static PacketProtocolInformation getProtocolInformation(java.io.InputStream inputStream)
        +                                                        throws java.io.IOException
        +
        Gets the PacketProtocolInformation of the packet.
        +
        +
        Parameters:
        +
        inputStream - The input stream for reading.
        +
        Returns:
        +
        The protocol information.
        +
        Throws:
        +
        java.lang.NullPointerException - The inputStream is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        +
      • +
      + + + +
        +
      • +

        savePacketProtocolInformation

        +
        public static void savePacketProtocolInformation(java.io.OutputStream outputStream,
        +                                                 PacketProtocolInformation information)
        +                                          throws java.io.IOException
        +
        Saves the PacketProtocolInformation of the packet.
        +
        +
        Parameters:
        +
        outputStream - The output stream for writing.
        +
        information - The protocol information.
        +
        Throws:
        +
        java.lang.NullPointerException - A parameter is null.
        +
        java.io.IOException - A stream exception occurs.
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(java.lang.Object o)
        +
        Gets whether this object equals the passed object.
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        Parameters:
        +
        o - The object to check.
        +
        Returns:
        +
        If the objects are equivalent.
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        Gets the hash code of the object.
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        Returns:
        +
        The hash code of the object.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/Base64Packet.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/Base64Packet.html new file mode 100644 index 0000000..cab4488 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/Base64Packet.html @@ -0,0 +1,736 @@ + + + + + +Base64Packet + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class Base64Packet

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket, IStreamedPacket
    +
    +
    +
    +
    public class Base64Packet
    +extends java.lang.Object
    +implements IStreamedPacket
    +
    This class provides a base64 encrypted packet that can hold an IPacket. +

    + Major ID: 255 + Minor ID: 251 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Base64Packet

        +
        public Base64Packet(IPacketFactory factory,
        +                    PacketLoader loader)
        +
        Constructs a new Base64Packet with the specified IPacketFactory and PacketLoader. + The encrypted data will not be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory or loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        Base64Packet

        +
        public Base64Packet(IPacketFactory factory,
        +                    PacketLoader loader,
        +                    boolean useCache)
        +
        Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader + and if the encrypted data should be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        useCache - If the encrypted data should be cached.
        +
        Throws:
        +
        java.lang.NullPointerException - factory or loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        Base64Packet

        +
        public Base64Packet(IPacketFactory factory,
        +                    PacketLoader loader,
        +                    IPacket packet)
        +
        Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader and IPacket. + The encrypted data will not be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        packet - The packet to store or null.
        +
        Throws:
        +
        java.lang.NullPointerException - factory or loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        Base64Packet

        +
        public Base64Packet(IPacketFactory factory,
        +                    PacketLoader loader,
        +                    IPacket packet,
        +                    boolean useCache)
        +
        Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader, + IPacket and if the encrypted data should be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        packet - The packet to store or null.
        +
        useCache - If the encrypted data should be cached.
        +
        Throws:
        +
        java.lang.NullPointerException - factory or loader is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readData

        +
        public void readData(java.io.OutputStream outputStream)
        +              throws java.io.IOException,
        +                     PacketException
        +
        Reads payload data to an OutputStream.
        +
        +
        Specified by:
        +
        readData in interface IStreamedPacket
        +
        Parameters:
        +
        outputStream - The output stream to read data to.
        +
        Throws:
        +
        java.lang.NullPointerException - outputStream is null.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writeData

        +
        public void writeData(java.io.InputStream inputStream,
        +                      int size)
        +               throws java.io.IOException,
        +                      PacketException
        +
        Writes payload data from an InputStream.
        +
        +
        Specified by:
        +
        writeData in interface IStreamedPacket
        +
        Parameters:
        +
        inputStream - The input stream to write data from.
        +
        size - The size of the input payload in bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - size is less than 0.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSize

        +
        public int getSize()
        +            throws PacketException
        +
        Gets the size of the output data.
        +
        +
        Specified by:
        +
        getSize in interface IStreamedPacket
        +
        Returns:
        +
        The size of the output data in bytes.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the PacketLoader in use.
        +
        +
        Returns:
        +
        The Packet Loader in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketLoader

        +
        public void setPacketLoader(PacketLoader loader)
        +
        Sets the PacketLoader to use.
        +
        +
        Parameters:
        +
        loader - The Packet Loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        setFactory

        +
        public void setFactory(IPacketFactory factory)
        +
        Sets the IPacketFactory to use.
        +
        +
        Parameters:
        +
        factory - The Packet Factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory is null.
        +
        +
      • +
      + + + +
        +
      • +

        getHeldPacket

        +
        public IPacket getHeldPacket()
        +
        Gets the held packet or null.
        +
        +
        Returns:
        +
        The packet or null.
        +
        +
      • +
      + + + +
        +
      • +

        setHeldPacket

        +
        public void setHeldPacket(IPacket packet)
        +
        Sets the held packet.
        +
        +
        Parameters:
        +
        packet - The new packet or null.
        +
        +
      • +
      + + + +
        +
      • +

        isCacheUsed

        +
        public boolean isCacheUsed()
        +
        Gets if the encrypted data is cached.
        +
        +
        Returns:
        +
        If the encrypted data is cached.
        +
        +
      • +
      + + + +
        +
      • +

        setCacheUsed

        +
        public void setCacheUsed(boolean used)
        +
        Sets if the encrypted data is cached.
        +
        +
        Parameters:
        +
        used - If the encrypted data should be cached.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.html new file mode 100644 index 0000000..de3eeac --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.html @@ -0,0 +1,832 @@ + + + + + +EncryptedPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class EncryptedPacket

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EncryptedPacket

        +
        public EncryptedPacket(IPacketFactory factory,
        +                       PacketLoader loader,
        +                       com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory)
        +
        Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader and ICipherFactory. + The encrypted data will not be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        cipherFactory - The cipher factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory, loader or cipherFactory is null.
        +
        +
      • +
      + + + +
        +
      • +

        EncryptedPacket

        +
        public EncryptedPacket(IPacketFactory factory,
        +                       PacketLoader loader,
        +                       com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory,
        +                       boolean useCache)
        +
        Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory + and if the encrypted data should be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        cipherFactory - The cipher factory to use.
        +
        useCache - If the encrypted data should be cached.
        +
        Throws:
        +
        java.lang.NullPointerException - factory, loader or cipherFactory is null.
        +
        +
      • +
      + + + +
        +
      • +

        EncryptedPacket

        +
        public EncryptedPacket(IPacketFactory factory,
        +                       PacketLoader loader,
        +                       com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory,
        +                       IPacket packet)
        +
        Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory and IPacket. + The encrypted data will not be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        cipherFactory - The cipher factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory, loader or cipherFactory is null.
        +
        +
      • +
      + + + +
        +
      • +

        EncryptedPacket

        +
        public EncryptedPacket(IPacketFactory factory,
        +                       PacketLoader loader,
        +                       com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory,
        +                       IPacket packet,
        +                       boolean useCache)
        +
        Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory, + IPacket and if the encrypted data should be cached.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        loader - The Packet Loader to use.
        +
        cipherFactory - The cipher factory to use.
        +
        useCache - If the encrypted data should be cached.
        +
        Throws:
        +
        java.lang.NullPointerException - factory, loader or cipherFactory is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readData

        +
        public void readData(java.io.OutputStream outputStream)
        +              throws java.io.IOException,
        +                     PacketException
        +
        Reads payload data to an OutputStream.
        +
        +
        Specified by:
        +
        readData in interface IStreamedPacket
        +
        Parameters:
        +
        outputStream - The output stream to read data to.
        +
        Throws:
        +
        java.lang.NullPointerException - outputStream is null.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writeData

        +
        public void writeData(java.io.InputStream inputStream,
        +                      int size)
        +               throws java.io.IOException,
        +                      PacketException
        +
        Writes payload data from an InputStream.
        +
        +
        Specified by:
        +
        writeData in interface IStreamedPacket
        +
        Parameters:
        +
        inputStream - The input stream to write data from.
        +
        size - The size of the input payload in bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - size is less than 0.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSize

        +
        public int getSize()
        +            throws PacketException
        +
        Gets the size of the output data.
        +
        +
        Specified by:
        +
        getSize in interface IStreamedPacket
        +
        Returns:
        +
        The size of the output data in bytes.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the PacketLoader in use.
        +
        +
        Returns:
        +
        The Packet Loader in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketLoader

        +
        public void setPacketLoader(PacketLoader loader)
        +
        Sets the PacketLoader to use.
        +
        +
        Parameters:
        +
        loader - The Packet Loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        setFactory

        +
        public void setFactory(IPacketFactory factory)
        +
        Sets the IPacketFactory to use.
        +
        +
        Parameters:
        +
        factory - The Packet Factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory is null.
        +
        +
      • +
      + + + +
        +
      • +

        getCipherFactory

        +
        public com.captainalm.lib.stdcrypt.encryption.ICipherFactory getCipherFactory()
        +
        Gets the ICipherFactory being used.
        +
        +
        Returns:
        +
        The Cipher Factory.
        +
        +
      • +
      + + + +
        +
      • +

        setCipherFactory

        +
        public void setCipherFactory(com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory)
        +
        Sets the ICipherFactory being used.
        +
        +
        Parameters:
        +
        cipherFactory - The Cipher Factory.
        +
        Throws:
        +
        java.lang.NullPointerException - cipherFactory is null.
        +
        +
      • +
      + + + +
        +
      • +

        getTrailingPassword

        +
        public java.lang.String getTrailingPassword()
        +
        Gets the trailing password (Or null if no trailing password).
        +
        +
        Returns:
        +
        The trailing password or null.
        +
        +
      • +
      + + + +
        +
      • +

        setTrailingPassword

        +
        public void setTrailingPassword(java.lang.String trailingPassword)
        +
        Sets the trailing password (Use null for no trailing password).
        +
        +
        Parameters:
        +
        trailingPassword - The new trailing password or null.
        +
        +
      • +
      + + + +
        +
      • +

        getHeldPacket

        +
        public IPacket getHeldPacket()
        +
        Gets the held packet or null.
        +
        +
        Returns:
        +
        The packet or null.
        +
        +
      • +
      + + + +
        +
      • +

        setHeldPacket

        +
        public void setHeldPacket(IPacket packet)
        +
        Sets the held packet.
        +
        +
        Parameters:
        +
        packet - The new packet or null.
        +
        +
      • +
      + + + +
        +
      • +

        isCacheUsed

        +
        public boolean isCacheUsed()
        +
        Gets if the encrypted data is cached.
        +
        +
        Specified by:
        +
        isCacheUsed in interface IInternalCache
        +
        Returns:
        +
        If the encrypted data is cached.
        +
        +
      • +
      + + + +
        +
      • +

        setCacheUsed

        +
        public void setCacheUsed(boolean used)
        +
        Sets if the encrypted data is cached.
        +
        +
        Specified by:
        +
        setCacheUsed in interface IInternalCache
        +
        Parameters:
        +
        used - If the encrypted data should be cached.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionCipherPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionCipherPacket.html new file mode 100644 index 0000000..f168831 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionCipherPacket.html @@ -0,0 +1,590 @@ + + + + + +NetworkEncryptionCipherPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class NetworkEncryptionCipherPacket

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      NetworkEncryptionCipherPacket(java.lang.Boolean acknowledgement, + java.lang.String[] cipherNames) +
      Constructs a new instance of NetworkEncryptionCipherPacket with the specified acknowledgement value and the specified ciphers.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.String[]getCiphers() +
      Gets the cipher names this packet contains.
      +
      PacketProtocolInformationgetProtocol() +
      Gets the protocol information.
      +
      intgetSize() +
      Gets the size of the output data.
      +
      static PacketProtocolInformationgetTheProtocol() +
      Gets the protocol information statically.
      +
      booleanisAcknowledgement() +
      Gets if the class instance is an Acknowledgement.
      +
      booleanisCacheUsed() +
      Gets if the cipher information is cached.
      +
      booleanisValid() +
      Gets if the packet is valid.
      +
      voidloadPayload(byte[] packetData) +
      Loads the packet payload from save data.
      +
      voidreadData(java.io.OutputStream outputStream) +
      Reads payload data to an OutputStream.
      +
      byte[]savePayload() +
      Saves the packet payload to a byte array.
      +
      voidsetCacheUsed(boolean used) +
      Sets if the cipher information is cached.
      +
      voidsetCiphers(java.lang.String[] cipherNames) +
      Sets the cipher names this packet contains.
      +
      voidwriteData(java.io.InputStream inputStream, + int size) +
      Writes payload data from an InputStream.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkEncryptionCipherPacket

        +
        public NetworkEncryptionCipherPacket(java.lang.Boolean acknowledgement,
        +                                     java.lang.String[] cipherNames)
        +
        Constructs a new instance of NetworkEncryptionCipherPacket with the specified acknowledgement value and the specified ciphers.
        +
        +
        Parameters:
        +
        acknowledgement - The acknowledgement value to use (Can be null).
        +
        cipherNames - The cipher names.
        +
        Throws:
        +
        java.lang.NullPointerException - cipherNames is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isAcknowledgement

        +
        public boolean isAcknowledgement()
        +
        Gets if the class instance is an Acknowledgement.
        +
        +
        Specified by:
        +
        isAcknowledgement in interface IAcknowledgement
        +
        Returns:
        +
        If the class instance is an Acknowledgement.
        +
        +
      • +
      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        readData

        +
        public void readData(java.io.OutputStream outputStream)
        +              throws java.io.IOException,
        +                     PacketException
        +
        Reads payload data to an OutputStream.
        +
        +
        Specified by:
        +
        readData in interface IStreamedPacket
        +
        Parameters:
        +
        outputStream - The output stream to read data to.
        +
        Throws:
        +
        java.lang.NullPointerException - outputStream is null.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        writeData

        +
        public void writeData(java.io.InputStream inputStream,
        +                      int size)
        +               throws java.io.IOException,
        +                      PacketException
        +
        Writes payload data from an InputStream.
        +
        +
        Specified by:
        +
        writeData in interface IStreamedPacket
        +
        Parameters:
        +
        inputStream - The input stream to write data from.
        +
        size - The size of the input payload in bytes.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - size is less than 0.
        +
        java.io.IOException - An IO Exception has occurred.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSize

        +
        public int getSize()
        +            throws PacketException
        +
        Gets the size of the output data.
        +
        +
        Specified by:
        +
        getSize in interface IStreamedPacket
        +
        Returns:
        +
        The size of the output data in bytes.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getCiphers

        +
        public java.lang.String[] getCiphers()
        +
        Gets the cipher names this packet contains.
        +
        +
        Returns:
        +
        An array of cipher names.
        +
        +
      • +
      + + + +
        +
      • +

        setCiphers

        +
        public void setCiphers(java.lang.String[] cipherNames)
        +
        Sets the cipher names this packet contains.
        +
        +
        Parameters:
        +
        cipherNames - The array of cipher names.
        +
        Throws:
        +
        java.lang.NullPointerException - cipherNames is null.
        +
        +
      • +
      + + + +
        +
      • +

        isCacheUsed

        +
        public boolean isCacheUsed()
        +
        Gets if the cipher information is cached.
        +
        +
        Specified by:
        +
        isCacheUsed in interface IInternalCache
        +
        Returns:
        +
        If the cipher information is cached.
        +
        +
      • +
      + + + +
        +
      • +

        setCacheUsed

        +
        public void setCacheUsed(boolean used)
        +
        Sets if the cipher information is cached.
        +
        +
        Specified by:
        +
        setCacheUsed in interface IInternalCache
        +
        Parameters:
        +
        used - If the cipher information is cached.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionUpgradePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionUpgradePacket.html new file mode 100644 index 0000000..ac91285 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkEncryptionUpgradePacket.html @@ -0,0 +1,590 @@ + + + + + +NetworkEncryptionUpgradePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class NetworkEncryptionUpgradePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IAcknowledgement, IPacket
    +
    +
    +
    +
    public class NetworkEncryptionUpgradePacket
    +extends java.lang.Object
    +implements IPacket, IAcknowledgement
    +
    This class provides the ability for supporting streams to upgrade to using password encrypted and / or base64 connections. + This class can also signal the use changes for Base64Packets or EncryptedPackets. +

    + Major ID: 255 + Minor ID: 253 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      NetworkEncryptionUpgradePacket(java.lang.Boolean acknowledgement, + boolean upgrade, + boolean base64ed, + com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory) +
      Constructs a new NetworkEncryptionUpgradePacket with the specified acknowledgement value, upgrade value, base 64 value and ICipherFactory.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkEncryptionUpgradePacket

        +
        public NetworkEncryptionUpgradePacket(java.lang.Boolean acknowledgement,
        +                                      boolean upgrade,
        +                                      boolean base64ed,
        +                                      com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory)
        +
        Constructs a new NetworkEncryptionUpgradePacket with the specified acknowledgement value, upgrade value, base 64 value and ICipherFactory.
        +
        +
        Parameters:
        +
        acknowledgement - The acknowledgement value to use (Can be null).
        +
        upgrade - Is the packet treated as a stream upgrade, See: isUpgrade().
        +
        base64ed - Is the packet signalling base 64 to be used.
        +
        cipherFactory - The cipherFactory to signal for use.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        isUpgrade

        +
        public boolean isUpgrade()
        +
        Gets if the packet is treated as a stream upgrade or + a change in packet use for EncryptedPacket and Base64Packet.
        +
        +
        Returns:
        +
        If the packet is a stream upgrade.
        +
        +
      • +
      + + + +
        +
      • +

        setUpgrade

        +
        public void setUpgrade(boolean upgrade)
        +
        Sets if the packet is treated as a stream upgrade or + a change in packet use for EncryptedPacket and Base64Packet.
        +
        +
        Parameters:
        +
        upgrade - If the packet is a stream upgrade.
        +
        +
      • +
      + + + +
        +
      • +

        isBase64ed

        +
        public boolean isBase64ed()
        +
        Gets if base 64 is used. + (This is not for this packet, it is part of the upgrade attributes.)
        +
        +
        Returns:
        +
        If base 64 is used.
        +
        +
      • +
      + + + +
        +
      • +

        setBase64ed

        +
        public void setBase64ed(boolean base64ed)
        +
        Sets if base64 is used. + (This is not for this packet, it is part of the upgrade attributes.)
        +
        +
        Parameters:
        +
        base64ed - If base 64 is to be used.
        +
        +
      • +
      + + + +
        +
      • +

        getCipherFactory

        +
        public com.captainalm.lib.stdcrypt.encryption.ICipherFactory getCipherFactory()
        +
        Gets the ICipherFactory being used or null.
        +
        +
        Returns:
        +
        The Cipher Factory or null.
        +
        +
      • +
      + + + +
        +
      • +

        setCipherFactory

        +
        public void setCipherFactory(com.captainalm.lib.stdcrypt.encryption.ICipherFactory cipherFactory)
        +
        Sets the ICipherFactory being used.
        +
        +
        Parameters:
        +
        cipherFactory - The Cipher Factory or null.
        +
        +
      • +
      + + + +
        +
      • +

        isAcknowledgement

        +
        public boolean isAcknowledgement()
        +
        Gets if the class instance is an Acknowledgement.
        +
        +
        Specified by:
        +
        isAcknowledgement in interface IAcknowledgement
        +
        Returns:
        +
        If the class instance is an Acknowledgement.
        +
        +
      • +
      + + + +
        +
      • +

        areSecretsSent

        +
        public boolean areSecretsSent()
        +
        Gets if secrets are sent as part of cipher settings.
        +
        +
        Returns:
        +
        If the secrets are part of the cipher settings.
        +
        +
      • +
      + + + +
        +
      • +

        setIfSecretsSent

        +
        public void setIfSecretsSent(boolean sendSecrets)
        +
        Sets if secrets should be sent as part of cipher settings.
        +
        +
        Parameters:
        +
        sendSecrets - If secrets are part of the cipher settings.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkIdentifierPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkIdentifierPacket.html new file mode 100644 index 0000000..298cb54 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkIdentifierPacket.html @@ -0,0 +1,392 @@ + + + + + +NetworkIdentifierPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class NetworkIdentifierPacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class NetworkIdentifierPacket
    +extends java.lang.Object
    +implements IPacket
    +
    This class provides a packet that is used to identify the type of network client is using this library. +

    + Major ID: 255 + Minor ID: 255 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkIdentifierPacket

        +
        public NetworkIdentifierPacket(java.lang.String id)
        +
        Constructs a new instance of NetworkIdentifierPacket with the specified ID.
        +
        +
        Parameters:
        +
        id - The network ID of the client.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkSSLUpgradePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkSSLUpgradePacket.html new file mode 100644 index 0000000..b43eaba --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/NetworkSSLUpgradePacket.html @@ -0,0 +1,414 @@ + + + + + +NetworkSSLUpgradePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.core
+

Class NetworkSSLUpgradePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IAcknowledgement, IPacket
    +
    +
    +
    +
    public class NetworkSSLUpgradePacket
    +extends java.lang.Object
    +implements IPacket, IAcknowledgement
    +
    This class provides the ability for supporting streams to upgrade to using SSL connections. +

    + Major ID: 255 + Minor ID: 254 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      NetworkSSLUpgradePacket(java.lang.Boolean acknowledgement) +
      Constructs a new NetworkSSLUpgrade packet with the specified acknowledgement value.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkSSLUpgradePacket

        +
        public NetworkSSLUpgradePacket(java.lang.Boolean acknowledgement)
        +
        Constructs a new NetworkSSLUpgrade packet with the specified acknowledgement value.
        +
        +
        Parameters:
        +
        acknowledgement - The acknowledgement value to use (Can be null).
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        isAcknowledgement

        +
        public boolean isAcknowledgement()
        +
        Gets if the class instance is an Acknowledgement.
        +
        +
        Specified by:
        +
        isAcknowledgement in interface IAcknowledgement
        +
        Returns:
        +
        If the class instance is an Acknowledgement.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-frame.html new file mode 100644 index 0000000..541b158 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-frame.html @@ -0,0 +1,25 @@ + + + + + +com.captainalm.lib.calmnet.packet.core + + + + + +

com.captainalm.lib.calmnet.packet.core

+
+

Classes

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-summary.html new file mode 100644 index 0000000..8895e1f --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-summary.html @@ -0,0 +1,188 @@ + + + + + +com.captainalm.lib.calmnet.packet.core + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.packet.core

+
+
This package contains the core network packets.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.packet.core Description

+
This package contains the core network packets. +

+ Major ID: 255 +

+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-tree.html new file mode 100644 index 0000000..603bced --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/core/package-tree.html @@ -0,0 +1,140 @@ + + + + + +com.captainalm.lib.calmnet.packet.core Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.packet.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.html new file mode 100644 index 0000000..501b32f --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.html @@ -0,0 +1,501 @@ + + + + + +CALMNETPacketFactory + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.factory
+

Class CALMNETPacketFactory

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CALMNETPacketFactory

        +
        public CALMNETPacketFactory(boolean preferStreamPackets,
        +                            PacketLoader loader)
        +
        Constructs a new Instance of CALMNETPacketFactory with if IStreamedPackets are preferred and the specified PacketLoader.
        +
        +
        Parameters:
        +
        preferStreamPackets - If streamed packets are preferred for construction.
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        CALMNETPacketFactory

        +
        public CALMNETPacketFactory(boolean preferStreamPackets,
        +                            PacketLoader loader,
        +                            IPacketFactory factory)
        +
        Constructs a new Instance of CALMNETPacketFactory with if IStreamedPackets are preferred, the specified PacketLoader and the IPacketFactory.
        +
        +
        Parameters:
        +
        preferStreamPackets - If streamed packets are preferred for construction.
        +
        loader - The packet loader to use.
        +
        factory - The packet factory to use or null (null signifies to use the same instance).
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + + + + + + + + + +
        +
      • +

        getPacketFactory

        +
        public IPacketFactory getPacketFactory()
        +
        Gets the IPacketFactory in use (Could be the same instance).
        +
        +
        Returns:
        +
        The packet factory in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketFactory

        +
        public void setPacketFactory(IPacketFactory factory)
        +
        Sets the IPacketFactory in use (null signifies to use the same instance).
        +
        +
        Parameters:
        +
        factory - The packet factory to use or null.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the PacketLoader in use.
        +
        +
        Returns:
        +
        The packet loader in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketLoader

        +
        public void setPacketLoader(PacketLoader loader)
        +
        Sets the PacketLoader to use.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        getCipherFactory

        +
        public com.captainalm.lib.stdcrypt.encryption.ICipherFactory getCipherFactory()
        +
        Gets the ICipherFactory in use (Could be the same instance).
        +
        +
        Returns:
        +
        The cipher factory in use.
        +
        +
      • +
      + + + +
        +
      • +

        setCipherFactory

        +
        public void setCipherFactory(com.captainalm.lib.stdcrypt.encryption.ICipherFactory factory)
        +
        Sets the ICipherFactory in use.
        +
        +
        Parameters:
        +
        factory - The cipher factory to use or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.html new file mode 100644 index 0000000..71b44d7 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.html @@ -0,0 +1,385 @@ + + + + + +CALMNETPacketFactoryWithPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.factory
+

Class CALMNETPacketFactoryWithPacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacketFactory
    +
    +
    +
    +
    public class CALMNETPacketFactoryWithPacket
    +extends CALMNETPacketFactory
    +
    This class provides a standard extensible IPacketFactory for calmnet packets + with the ability to set the IPacket of supporting packets.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CALMNETPacketFactoryWithPacket

        +
        public CALMNETPacketFactoryWithPacket(boolean preferStreamPackets,
        +                                      PacketLoader loader)
        +
        Constructs a new Instance of CALMNETPacketFactoryWithPacket with if IStreamedPackets are preferred and the specified PacketLoader.
        +
        +
        Parameters:
        +
        preferStreamPackets - If streamed packets are preferred for construction.
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        CALMNETPacketFactoryWithPacket

        +
        public CALMNETPacketFactoryWithPacket(boolean preferStreamPackets,
        +                                      PacketLoader loader,
        +                                      IPacketFactory factory)
        +
        Constructs a new Instance of CALMNETPacketFactoryWithPacket with if IStreamedPackets are preferred, the specified PacketLoader and the IPacketFactory.
        +
        +
        Parameters:
        +
        preferStreamPackets - If streamed packets are preferred for construction.
        +
        loader - The packet loader to use.
        +
        factory - The packet factory to use or null (null signifies to use the same instance).
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.html new file mode 100644 index 0000000..92f7866 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.html @@ -0,0 +1,279 @@ + + + + + +IPacketFactory + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.factory
+

Interface IPacketFactory

+
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-frame.html new file mode 100644 index 0000000..c2edc72 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-frame.html @@ -0,0 +1,25 @@ + + + + + +com.captainalm.lib.calmnet.packet.factory + + + + + +

com.captainalm.lib.calmnet.packet.factory

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-summary.html new file mode 100644 index 0000000..318b03f --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-summary.html @@ -0,0 +1,179 @@ + + + + + +com.captainalm.lib.calmnet.packet.factory + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.packet.factory

+
+
This package contains the IPacketFactory interface and standard classes.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.packet.factory Description

+
This package contains the IPacketFactory interface and standard classes.
+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-tree.html new file mode 100644 index 0000000..19ff4f7 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/factory/package-tree.html @@ -0,0 +1,143 @@ + + + + + +com.captainalm.lib.calmnet.packet.factory Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.packet.factory

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocatePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocatePacket.html new file mode 100644 index 0000000..0865e33 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocatePacket.html @@ -0,0 +1,438 @@ + + + + + +FragmentAllocatePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentAllocatePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentAllocatePacket
    +extends java.lang.Object
    +implements IPacket
    +
    This class provides a packet for fragment allocation requesting. + The response packet is: FragmentAllocationPacket. +

    + Major ID: 254 + Minor ID: 1 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FragmentAllocatePacket(java.lang.Integer fragmentCount, + java.util.UUID allocationID) +
      Constructs a new FragmentAllocatePacket given the fragment count and allocation UUID.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentAllocatePacket

        +
        public FragmentAllocatePacket(java.lang.Integer fragmentCount,
        +                              java.util.UUID allocationID)
        +
        Constructs a new FragmentAllocatePacket given the fragment count and allocation UUID.
        +
        +
        Parameters:
        +
        fragmentCount - The number of fragments to allocate.
        +
        allocationID - The allocation ID.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - fragmentCount is less than 1.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getFragmentCount

        +
        public java.lang.Integer getFragmentCount()
        +
        Gets the number of fragments or null.
        +
        +
        Returns:
        +
        The number of fragments or null.
        +
        +
      • +
      + + + +
        +
      • +

        getAllocationID

        +
        public java.util.UUID getAllocationID()
        +
        Gets the allocation ID or null.
        +
        +
        Returns:
        +
        The allocation ID or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocationPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocationPacket.html new file mode 100644 index 0000000..afb51ff --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentAllocationPacket.html @@ -0,0 +1,448 @@ + + + + + +FragmentAllocationPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentAllocationPacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentAllocationPacket
    +extends FragmentPIDPacket
    +
    This class provides a packet for giving the allocated packetID + as a response for FragmentAllocatePacket. +

    + Major ID: 254 + Minor ID: 2 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FragmentAllocationPacket(java.lang.Integer packetID, + java.util.UUID allocationID, + java.lang.Boolean success) +
      Constructs a new FragmentAllocationPacket given the packet ID, allocation ID and if it's successful.
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentAllocationPacket

        +
        public FragmentAllocationPacket(java.lang.Integer packetID,
        +                                java.util.UUID allocationID,
        +                                java.lang.Boolean success)
        +
        Constructs a new FragmentAllocationPacket given the packet ID, allocation ID and if it's successful.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        allocationID - The allocation ID.
        +
        success - The allocation was successful.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Overrides:
        +
        isValid in class FragmentPIDPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        allocationSuccessful

        +
        public boolean allocationSuccessful()
        +
        Checks if the allocation is successful.
        +
        +
        Returns:
        +
        If the allocation was successful.
        +
        +
      • +
      + + + +
        +
      • +

        getAllocationID

        +
        public java.util.UUID getAllocationID()
        +
        Gets the allocation ID or null.
        +
        +
        Returns:
        +
        The allocation ID or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessagePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessagePacket.html new file mode 100644 index 0000000..0aeccdb --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessagePacket.html @@ -0,0 +1,400 @@ + + + + + +FragmentMessagePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentMessagePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentMessagePacket
    +extends FragmentPIDMSGPacket
    +
    This class provides a packet for sending a payload with a packetID and fragmentID. + The response packet is: FragmentMessageResponsePacket. +

    + Major ID: 254 + Minor ID: 3 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentMessagePacket

        +
        public FragmentMessagePacket(java.lang.Integer packetID,
        +                             java.lang.Integer fragmentID,
        +                             byte[] payload)
        +
        Constructs a new FragmentMessagePacket given the packet ID, fragment ID and payload.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        fragmentID - The fragment ID.
        +
        payload - The payload to store.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID or fragmentID is less than 0.
        +
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessageResponsePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessageResponsePacket.html new file mode 100644 index 0000000..4419b6b --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentMessageResponsePacket.html @@ -0,0 +1,349 @@ + + + + + +FragmentMessageResponsePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentMessageResponsePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentMessageResponsePacket
    +extends FragmentPIDMSGPacket
    +
    This class provides a packet for sending an optional payload with a packetID and fragmentID + as a response for FragmentMessagePacket. +

    + Major ID: 254 + Minor ID: 4 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentMessageResponsePacket

        +
        public FragmentMessageResponsePacket(java.lang.Integer packetID,
        +                                     java.lang.Integer fragmentID,
        +                                     byte[] payload)
        +
        Constructs a new FragmentMessageResponsePacket given the packet ID, fragment ID and payload.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        fragmentID - The fragment ID.
        +
        payload - The payload to store.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID or fragmentID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDAKNPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDAKNPacket.html new file mode 100644 index 0000000..9da55a3 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDAKNPacket.html @@ -0,0 +1,398 @@ + + + + + +FragmentPIDAKNPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentPIDAKNPacket

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FragmentPIDAKNPacket(java.lang.Integer packetID, + java.lang.Boolean acknowledgement) +
      Constructs a new FragmentPIDPacket given the packet ID and the acknowledgement value.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleanisAcknowledgement() +
      Gets if the class instance is an Acknowledgement.
      +
      booleanisValid() +
      Gets if the packet is valid.
      +
      voidloadPayload(byte[] packetData) +
      Loads the packet payload from save data.
      +
      byte[]savePayload() +
      Saves the packet payload to a byte array.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentPIDAKNPacket

        +
        public FragmentPIDAKNPacket(java.lang.Integer packetID,
        +                            java.lang.Boolean acknowledgement)
        +
        Constructs a new FragmentPIDPacket given the packet ID and the acknowledgement value.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        acknowledgement - The acknowledgement value to use.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Overrides:
        +
        isValid in class FragmentPIDPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Specified by:
        +
        savePayload in interface IPacket
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Specified by:
        +
        loadPayload in interface IPacket
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        isAcknowledgement

        +
        public boolean isAcknowledgement()
        +
        Gets if the class instance is an Acknowledgement.
        +
        +
        Specified by:
        +
        isAcknowledgement in interface IAcknowledgement
        +
        Returns:
        +
        If the class instance is an Acknowledgement.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDMSGPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDMSGPacket.html new file mode 100644 index 0000000..e9a2815 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDMSGPacket.html @@ -0,0 +1,414 @@ + + + + + +FragmentPIDMSGPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentPIDMSGPacket

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FragmentPIDMSGPacket(java.lang.Integer packetID, + java.lang.Integer fragmentID, + byte[] payload) +
      Constructs a new FragmentPIDMSGPacket given the packet ID, fragment ID and payload.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.IntegergetFragmentID() +
      Gets the fragment ID or null.
      +
      byte[]getFragmentMessage() +
      Gets the fragment message byte array or null.
      +
      booleanisValid() +
      Gets if the packet is valid.
      +
      voidloadPayload(byte[] packetData) +
      Loads the packet payload from save data.
      +
      byte[]savePayload() +
      Saves the packet payload to a byte array.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentPIDMSGPacket

        +
        public FragmentPIDMSGPacket(java.lang.Integer packetID,
        +                            java.lang.Integer fragmentID,
        +                            byte[] payload)
        +
        Constructs a new FragmentPIDMSGPacket given the packet ID, fragment ID and payload.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        fragmentID - The fragment ID.
        +
        payload - The payload to store.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID or fragmentID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Overrides:
        +
        isValid in class FragmentPIDPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getFragmentMessage

        +
        public byte[] getFragmentMessage()
        +
        Gets the fragment message byte array or null.
        +
        +
        Returns:
        +
        The byte array or null.
        +
        +
      • +
      + + + +
        +
      • +

        getFragmentID

        +
        public java.lang.Integer getFragmentID()
        +
        Gets the fragment ID or null.
        +
        +
        Returns:
        +
        The fragment ID or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDPacket.html new file mode 100644 index 0000000..6010302 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentPIDPacket.html @@ -0,0 +1,328 @@ + + + + + +FragmentPIDPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentPIDPacket

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      FragmentPIDPacket(java.lang.Integer packetID) +
      Constructs a new FragmentPIDPacket given the packet ID.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.IntegergetPacketID() +
      Gets the packet ID or null.
      +
      booleanisValid() +
      Gets if the packet is valid.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentPIDPacket

        +
        public FragmentPIDPacket(java.lang.Integer packetID)
        +
        Constructs a new FragmentPIDPacket given the packet ID.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isValid

        +
        public boolean isValid()
        +
        Gets if the packet is valid.
        +
        +
        Specified by:
        +
        isValid in interface IPacket
        +
        Returns:
        +
        Is the packet valid?
        +
        +
      • +
      + + + +
        +
      • +

        getPacketID

        +
        public java.lang.Integer getPacketID()
        +
        Gets the packet ID or null.
        +
        +
        Returns:
        +
        The packet ID or null.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.html new file mode 100644 index 0000000..7311898 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.html @@ -0,0 +1,772 @@ + + + + + +FragmentReceiver + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentReceiver

+
+
+ +
+
    +
  • +
    +
    +
    public final class FragmentReceiver
    +extends java.lang.Object
    +
    This class provides the ability to re-construct packets from com.captainalm.lib.calmnet.packet.fragment.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentReceiver

        +
        public FragmentReceiver(PacketLoader loader,
        +                        IPacketFactory factory)
        +
        Constructs a new FragmentReceiver with the specified PacketLoader and IPacketFactory.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        factory - The packet factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader or factory is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        receivePacket

        +
        public IPacket receivePacket()
        +                      throws java.lang.InterruptedException
        +
        Receives a IPacket from the FragmentReceiver. + This method blocks until a packet can be received.
        +
        +
        Returns:
        +
        The received packet.
        +
        Throws:
        +
        java.lang.InterruptedException - The Thread was Interrupted.
        +
        +
      • +
      + + + +
        +
      • +

        receivePacketPolling

        +
        public IPacket receivePacketPolling()
        +
        Receives a IPacket from the FragmentReceiver.
        +
        +
        Returns:
        +
        The received packet or null.
        +
        +
      • +
      + + + +
        +
      • +

        sendPacket

        +
        public IPacket[] sendPacket()
        +                     throws PacketException
        +
        Sends the current IPackets from the FragmentReceiver.
        +
        +
        Returns:
        +
        The packets to send.
        +
        Throws:
        +
        PacketException - A Packet Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        receivePacket

        +
        public boolean receivePacket(IPacket packetIn)
        +                      throws PacketException
        +
        Receives a IPacket into the FragmentReceiver.
        +
        +
        Parameters:
        +
        packetIn - The packet to receive.
        +
        Returns:
        +
        If the received packet was a fragment packet.
        +
        Throws:
        +
        PacketException - A Packet Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        arePacketsWaiting

        +
        public boolean arePacketsWaiting()
        +
        Gets whether packets are waiting to be received.
        +
        +
        Returns:
        +
        If packets are waiting to be received.
        +
        +
      • +
      + + + +
        +
      • +

        clearWaitingPackets

        +
        public void clearWaitingPackets()
        +
        Clears the currently waiting packets.
        +
      • +
      + + + +
        +
      • +

        deletePacketFromRegistry

        +
        public void deletePacketFromRegistry(int id)
        +
        Deletes a packet from the registry and requests the sender to stop sending.
        +
        +
        Parameters:
        +
        id - The ID of the packet to remove.
        +
        +
      • +
      + + + +
        +
      • +

        clearRegistry

        +
        public void clearRegistry()
        +
        Clears the registry (And requests the sender to stop sending). + NOTE: Do NOT do this unless you are finished with the FragmentReceiver.
        +
      • +
      + + + +
        +
      • +

        areFinishedIDsWaiting

        +
        public boolean areFinishedIDsWaiting()
        +
        Gets whether finished IDs are waiting for obtaining.
        +
        +
        Returns:
        +
        If finished IDs are waiting for obtaining.
        +
        +
      • +
      + + + +
        +
      • +

        getLastIDFinished

        +
        public int getLastIDFinished()
        +                      throws java.lang.InterruptedException
        +
        Gets the last finished packet ID. + This method blocks until a packet finishes processing.
        +
        +
        Returns:
        +
        The last finished packet ID.
        +
        Throws:
        +
        java.lang.InterruptedException - The Thread was Interrupted.
        +
        +
      • +
      + + + +
        +
      • +

        pollLastIDFinished

        +
        public java.lang.Integer pollLastIDFinished()
        +
        Polls the last finished packet ID.
        +
        +
        Returns:
        +
        The last finished packet ID.
        +
        +
      • +
      + + + +
        +
      • +

        clearLastIDFinished

        +
        public void clearLastIDFinished()
        +
        Clears all the last finished packet IDs.
        +
      • +
      + + + +
        +
      • +

        getPacketFactory

        +
        public IPacketFactory getPacketFactory()
        +
        Gets the IPacketFactory in use.
        +
        +
        Returns:
        +
        The PacketFactory in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketFactory

        +
        public void setPacketFactory(IPacketFactory factory)
        +
        Sets the IPacketFactory to use.
        +
        +
        Parameters:
        +
        factory - The packet factory to use.
        +
        Throws:
        +
        java.lang.NullPointerException - factory is null.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the PacketLoader in use.
        +
        +
        Returns:
        +
        The PacketLoader in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketLoader

        +
        public void setPacketLoader(PacketLoader loader)
        +
        Sets the PacketLoader to use.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        shouldVerifyResponses

        +
        public boolean shouldVerifyResponses()
        +
        Gets whether responses should be verified.
        +
        +
        Returns:
        +
        Should responses be verified.
        +
        +
      • +
      + + + +
        +
      • +

        setResponseVerification

        +
        public void setResponseVerification(boolean state)
        +
        Sets whether responses should be verified. + If set to false, setSentDataWillBeAllVerified(boolean) will be set to false too.
        +
        +
        Parameters:
        +
        state - If responses should be verified.
        +
        +
      • +
      + + + +
        +
      • +

        shouldSentDataBeAllVerified

        +
        public boolean shouldSentDataBeAllVerified()
        +
        Gets whether all sent fragments are verified to be equal.
        +
        +
        Returns:
        +
        If all sent fragments will be verified to be equal.
        +
        +
      • +
      + + + +
        +
      • +

        setSentDataWillBeAllVerified

        +
        public void setSentDataWillBeAllVerified(boolean state)
        +
        Gets whether all sent fragments are verified to be equal. + Requires setResponseVerification(boolean) set to true.
        +
        +
        Parameters:
        +
        state - If all sent fragments will be verified to be equal.
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        stopDataVerificationAndCompleteReceive

        +
        public void stopDataVerificationAndCompleteReceive(int id)
        +
        Stops data verification for the specified Packet ID when shouldSentDataBeAllVerified() is true.
        +
        +
        Parameters:
        +
        id - The PacketID to act on.
        +
        +
      • +
      + + + +
        +
      • +

        stopAllDataVerificationAndCompleteReceive

        +
        public void stopAllDataVerificationAndCompleteReceive()
        +
        Stops data verification for all packets being received when shouldSentDataBeAllVerified() is true.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentRetrySendPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentRetrySendPacket.html new file mode 100644 index 0000000..b430803 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentRetrySendPacket.html @@ -0,0 +1,346 @@ + + + + + +FragmentRetrySendPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentRetrySendPacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IAcknowledgement, IPacket
    +
    +
    +
    +
    public class FragmentRetrySendPacket
    +extends FragmentPIDAKNPacket
    +
    This class provides a packet for signalling that the sending end + should start re-sending un acknowledged fragment packets. +

    + Major ID: 254 + Minor ID: 6 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentRetrySendPacket

        +
        public FragmentRetrySendPacket(java.lang.Integer packetID,
        +                               java.lang.Boolean acknowledgement)
        +
        Constructs a new FragmentRetrySendPacket given the packet ID and the acknowledgement value.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        acknowledgement - The acknowledgement value to use.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendCompletePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendCompletePacket.html new file mode 100644 index 0000000..6df3e50 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendCompletePacket.html @@ -0,0 +1,345 @@ + + + + + +FragmentSendCompletePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentSendCompletePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IAcknowledgement, IPacket
    +
    +
    +
    +
    public class FragmentSendCompletePacket
    +extends FragmentPIDAKNPacket
    +
    This class provides a packet for signalling that all fragments for a packet have been sent or that sending has been successfully cancelled. +

    + Major ID: 254 + Minor ID: 5 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentSendCompletePacket

        +
        public FragmentSendCompletePacket(java.lang.Integer packetID,
        +                                  java.lang.Boolean acknowledgement)
        +
        Constructs a new FragmentSendCompletePacket given the packet ID and the acknowledgement value.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        acknowledgement - The acknowledgement value to use.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.html new file mode 100644 index 0000000..d019095 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.html @@ -0,0 +1,377 @@ + + + + + +FragmentSendStopPacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentSendStopPacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentSendStopPacket
    +extends FragmentPIDPacket
    +
    This class provides a packet for stopping the remote FragmentSender. +

    + Major ID: 254 + Minor ID: 7 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentSendStopPacket

        +
        public FragmentSendStopPacket(java.lang.Integer packetID)
        +
        Constructs a new FragmentSendStopPacket given the packet ID.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendVerifyCompletePacket.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendVerifyCompletePacket.html new file mode 100644 index 0000000..242b09e --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSendVerifyCompletePacket.html @@ -0,0 +1,377 @@ + + + + + +FragmentSendVerifyCompletePacket + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentSendVerifyCompletePacket

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    IPacket
    +
    +
    +
    +
    public class FragmentSendVerifyCompletePacket
    +extends FragmentPIDPacket
    +
    This class provides a packet for stating that all packets have been successfully sent and verified. +

    + Major ID: 254 + Minor ID: 8 +

    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentSendVerifyCompletePacket

        +
        public FragmentSendVerifyCompletePacket(java.lang.Integer packetID)
        +
        Constructs a new FragmentSendVerifyCompletePacket given the packet ID.
        +
        +
        Parameters:
        +
        packetID - The packet ID.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - packetID is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProtocol

        +
        public PacketProtocolInformation getProtocol()
        +
        Gets the protocol information.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        getTheProtocol

        +
        public static PacketProtocolInformation getTheProtocol()
        +
        Gets the protocol information statically.
        +
        +
        Returns:
        +
        The protocol information.
        +
        +
      • +
      + + + +
        +
      • +

        savePayload

        +
        public byte[] savePayload()
        +                   throws PacketException
        +
        Saves the packet payload to a byte array.
        +
        +
        Returns:
        +
        The packet payload data.
        +
        Throws:
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        loadPayload

        +
        public void loadPayload(byte[] packetData)
        +                 throws PacketException
        +
        Loads the packet payload from save data.
        +
        +
        Parameters:
        +
        packetData - The packet payload data.
        +
        Throws:
        +
        java.lang.NullPointerException - The new store data is null.
        +
        PacketException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.html new file mode 100644 index 0000000..6093d59 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.html @@ -0,0 +1,720 @@ + + + + + +FragmentSender + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.packet.fragment
+

Class FragmentSender

+
+
+ +
+
    +
  • +
    +
    +
    public final class FragmentSender
    +extends java.lang.Object
    +
    This class provides the ability to create packets for com.captainalm.lib.calmnet.packet.fragment.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FragmentSender

        +
        public FragmentSender(PacketLoader loader)
        +
        Constructs a new FragmentSender with the specified PacketLoader.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        FragmentSender

        +
        public FragmentSender(PacketLoader loader,
        +                      int newSize)
        +
        Constructs a new FragmentSender with the specified PacketLoader + and packet split size in bytes.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        newSize - The new split size.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        java.lang.IllegalArgumentException - newSize is less than 1.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        sendPacket

        +
        public void sendPacket(IPacket packetIn)
        +
        Sends a IPacket using this FragmentSender.
        +
        +
        Parameters:
        +
        packetIn - The packet to fragment and send.
        +
        +
      • +
      + + + +
        +
      • +

        sendPacket

        +
        public IPacket[] sendPacket()
        +                     throws PacketException
        +
        Sends the current IPackets from the FragmentSender.
        +
        +
        Returns:
        +
        The packets to send.
        +
        Throws:
        +
        PacketException - A Packet Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        receivePacket

        +
        public boolean receivePacket(IPacket packetIn)
        +                      throws PacketException
        +
        Receives a IPacket into the FragmentSender.
        +
        +
        Parameters:
        +
        packetIn - The packet to receive.
        +
        Returns:
        +
        If the received packet was a fragment packet.
        +
        Throws:
        +
        PacketException - A Packet Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        arePacketsWaiting

        +
        public boolean arePacketsWaiting()
        +
        Gets whether packets are waiting for allocation.
        +
        +
        Returns:
        +
        If packets are waiting for allocation.
        +
        +
      • +
      + + + +
        +
      • +

        clearWaitingPackets

        +
        public void clearWaitingPackets()
        +
        Clears the currently waiting packets.
        +
      • +
      + + + +
        +
      • +

        deletePacketFromRegistry

        +
        public void deletePacketFromRegistry(int id)
        +
        Deletes a packet from the registry.
        +
        +
        Parameters:
        +
        id - The ID of the packet to remove.
        +
        +
      • +
      + + + +
        +
      • +

        clearRegistry

        +
        public void clearRegistry()
        +
        Clears the registry. + NOTE: Do NOT do this unless you are finished with the FragmentSender.
        +
      • +
      + + + +
        +
      • +

        areFinishedIDsWaiting

        +
        public boolean areFinishedIDsWaiting()
        +
        Gets whether finished IDs are waiting for obtaining.
        +
        +
        Returns:
        +
        If finished IDs are waiting for obtaining.
        +
        +
      • +
      + + + +
        +
      • +

        getLastIDFinished

        +
        public int getLastIDFinished()
        +                      throws java.lang.InterruptedException
        +
        Gets the last finished packet ID. + This method blocks until a packet finishes processing.
        +
        +
        Returns:
        +
        The last finished packet ID.
        +
        Throws:
        +
        java.lang.InterruptedException - The Thread was Interrupted.
        +
        +
      • +
      + + + +
        +
      • +

        pollLastIDFinished

        +
        public java.lang.Integer pollLastIDFinished()
        +
        Polls the last finished packet ID.
        +
        +
        Returns:
        +
        The last finished packet ID.
        +
        +
      • +
      + + + +
        +
      • +

        clearLastIDFinished

        +
        public void clearLastIDFinished()
        +
        Clears all the last finished packet IDs.
        +
      • +
      + + + +
        +
      • +

        getSplitSize

        +
        public int getSplitSize()
        +
        Gets the current packet split size in bytes.
        +
        +
        Returns:
        +
        The current packet split size.
        +
        +
      • +
      + + + +
        +
      • +

        setSplitSize

        +
        public void setSplitSize(int newSize)
        +
        Sets the packet split size in bytes.
        +
        +
        Parameters:
        +
        newSize - The new packet split size.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - newSize is less than 1.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketLoader

        +
        public PacketLoader getPacketLoader()
        +
        Gets the PacketLoader in use.
        +
        +
        Returns:
        +
        The PacketLoader in use.
        +
        +
      • +
      + + + +
        +
      • +

        setPacketLoader

        +
        public void setPacketLoader(PacketLoader loader)
        +
        Sets the PacketLoader to use.
        +
        +
        Parameters:
        +
        loader - The packet loader to use.
        +
        Throws:
        +
        java.lang.NullPointerException - loader is null.
        +
        +
      • +
      + + + +
        +
      • +

        shouldVerifyResponses

        +
        public boolean shouldVerifyResponses()
        +
        Gets whether responses should be verified.
        +
        +
        Returns:
        +
        Should responses be verified.
        +
        +
      • +
      + + + +
        +
      • +

        setResponseVerification

        +
        public void setResponseVerification(boolean state)
        +
        Sets whether responses should be verified. + If set to false, setSentDataWillBeAllVerified(boolean) will be set to false too.
        +
        +
        Parameters:
        +
        state - If responses should be verified.
        +
        +
      • +
      + + + +
        +
      • +

        shouldSentDataBeAllVerified

        +
        public boolean shouldSentDataBeAllVerified()
        +
        Gets whether all sent fragments are verified to be equal.
        +
        +
        Returns:
        +
        If all sent fragments will be verified to be equal.
        +
        +
      • +
      + + + +
        +
      • +

        setSentDataWillBeAllVerified

        +
        public void setSentDataWillBeAllVerified(boolean state)
        +
        Gets whether all sent fragments are verified to be equal. + Requires setResponseVerification(boolean) set to true.
        +
        +
        Parameters:
        +
        state - If all sent fragments will be verified to be equal.
        +
        +
      • +
      + + + +
        +
      • +

        stopDataVerificationAndCompleteSend

        +
        public void stopDataVerificationAndCompleteSend(int id)
        +
        Stops data verification for the specified Packet ID when shouldSentDataBeAllVerified() is true.
        +
        +
        Parameters:
        +
        id - The PacketID to act on.
        +
        +
      • +
      + + + +
        +
      • +

        stopAllDataVerificationAndCompleteSend

        +
        public void stopAllDataVerificationAndCompleteSend()
        +
        Stops data verification for all packets being sent when shouldSentDataBeAllVerified() is true.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-frame.html new file mode 100644 index 0000000..fc16473 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-frame.html @@ -0,0 +1,32 @@ + + + + + +com.captainalm.lib.calmnet.packet.fragment + + + + + +

com.captainalm.lib.calmnet.packet.fragment

+
+

Classes

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-summary.html new file mode 100644 index 0000000..c7a5fb1 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-summary.html @@ -0,0 +1,235 @@ + + + + + +com.captainalm.lib.calmnet.packet.fragment + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.packet.fragment

+
+
This package contains the fragment network packets and + the FragmentReceiver and FragmentSender objects.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.packet.fragment Description

+
This package contains the fragment network packets and + the FragmentReceiver and FragmentSender objects. +

+ Major ID: 254 +

+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-tree.html new file mode 100644 index 0000000..d6d62f4 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/fragment/package-tree.html @@ -0,0 +1,156 @@ + + + + + +com.captainalm.lib.calmnet.packet.fragment Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.packet.fragment

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/packet/package-frame.html new file mode 100644 index 0000000..6c91931 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/package-frame.html @@ -0,0 +1,32 @@ + + + + + +com.captainalm.lib.calmnet.packet + + + + + +

com.captainalm.lib.calmnet.packet

+
+

Interfaces

+ +

Classes

+ +

Exceptions

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/packet/package-summary.html new file mode 100644 index 0000000..7a5ad24 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/package-summary.html @@ -0,0 +1,215 @@ + + + + + +com.captainalm.lib.calmnet.packet + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.packet

+
+
This package contains the network packets and handling code.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.packet Description

+
This package contains the network packets and handling code.
+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/packet/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/packet/package-tree.html new file mode 100644 index 0000000..efaa8d8 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/packet/package-tree.html @@ -0,0 +1,155 @@ + + + + + +com.captainalm.lib.calmnet.packet Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.packet

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilities.html b/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilities.html new file mode 100644 index 0000000..4cbf705 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilities.html @@ -0,0 +1,571 @@ + + + + + +SSLUtilities + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.ssl
+

Class SSLUtilities

+
+
+ +
+
    +
  • +
    +
    +
    public class SSLUtilities
    +extends java.lang.Object
    +
    This class provides SSL utilities to create SSLContext and SSLSocket + objects using JKS files (Or other supported formats).
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      SSLUtilities() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static javax.net.ssl.SSLSocketgetSSLClientSocket(javax.net.ssl.SSLContext sslContext, + java.lang.String host, + int port) +
      Creates a new SSLSocket using the specified SSLContext, host and port.
      +
      static javax.net.ssl.SSLContextgetSSLContext(java.lang.String algorithmName, + java.security.KeyStore unifiedKeyStore, + char[] keyStorePassword) +
      Gets the SSL context merged with the JRE Trust Store using a unified KeyStore.
      +
      static javax.net.ssl.SSLContextgetSSLContext(java.lang.String algorithmName, + java.security.KeyStore privateKeyStore, + char[] privateKeyStorePassword, + java.security.KeyStore trustKeyStore) +
      Gets the SSL context merged with the JRE Trust Store using separate private and trust KeyStores.
      +
      static javax.net.ssl.SSLContextgetSSLContextNoJRETrust(java.lang.String algorithmName, + java.security.KeyStore unifiedKeyStore, + char[] keyStorePassword) +
      Gets the SSL context without the JRE Trust Store using a unified KeyStore.
      +
      static javax.net.ssl.SSLContextgetSSLContextNoJRETrust(java.lang.String algorithmName, + java.security.KeyStore privateKeyStore, + char[] privateKeyStorePassword, + java.security.KeyStore trustKeyStore) +
      Gets the SSL context without the JRE Trust Store using separate private and trust KeyStores.
      +
      static javax.net.ssl.SSLServerSocketgetSSLServerSocket(javax.net.ssl.SSLContext sslContext, + int port, + int backlog, + java.net.InetAddress ifAddress) +
      Gets the SSL Server socket for the specified SSLContext, port, backlog and InetAddress.
      +
      static java.security.KeyStoreloadKeyStore(java.lang.String type, + java.io.File file, + java.lang.String password) +
      Loads a Keystore of a certain type from a file given the password.
      +
      static javax.net.ssl.SSLSocketupgradeClientSocketToSSL(javax.net.ssl.SSLContext sslContext, + java.net.Socket socket, + java.lang.String host, + int port, + boolean autoClose) +
      Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed.
      +
      static javax.net.ssl.SSLSocketupgradeClientSocketToSSL(javax.net.ssl.SSLContext sslContext, + java.net.Socket socket, + java.lang.String host, + int port, + boolean autoClose, + boolean onClient) +
      Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SSLUtilities

        +
        public SSLUtilities()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        loadKeyStore

        +
        public static java.security.KeyStore loadKeyStore(java.lang.String type,
        +                                                  java.io.File file,
        +                                                  java.lang.String password)
        +                                           throws SSLUtilityException
        +
        Loads a Keystore of a certain type from a file given the password.
        +
        +
        Parameters:
        +
        type - The type of keystore (pass null for the default type).
        +
        file - The file to load the keystore from.
        +
        password - The password of the keystore (Can be null).
        +
        Returns:
        +
        The keystore.
        +
        Throws:
        +
        java.lang.NullPointerException - file is null.
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLContextNoJRETrust

        +
        public static javax.net.ssl.SSLContext getSSLContextNoJRETrust(java.lang.String algorithmName,
        +                                                               java.security.KeyStore unifiedKeyStore,
        +                                                               char[] keyStorePassword)
        +                                                        throws SSLUtilityException
        +
        Gets the SSL context without the JRE Trust Store using a unified KeyStore.
        +
        +
        Parameters:
        +
        algorithmName - The name of the context protocol or null for the JRE Default (TLSv1).
        +
        unifiedKeyStore - The keystore for use with the private and trust stores.
        +
        keyStorePassword - The password of the key store or null (Use "changeit" for JKS keystore defaults).
        +
        Returns:
        +
        The SSLContext.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLContextNoJRETrust

        +
        public static javax.net.ssl.SSLContext getSSLContextNoJRETrust(java.lang.String algorithmName,
        +                                                               java.security.KeyStore privateKeyStore,
        +                                                               char[] privateKeyStorePassword,
        +                                                               java.security.KeyStore trustKeyStore)
        +                                                        throws SSLUtilityException
        +
        Gets the SSL context without the JRE Trust Store using separate private and trust KeyStores.
        +
        +
        Parameters:
        +
        algorithmName - The name of the context protocol or null for the JRE Default (TLSv1).
        +
        privateKeyStore - The keystore for use with the private store.
        +
        privateKeyStorePassword - The password of the private key store or null (Use "changeit" for JKS keystore defaults).
        +
        trustKeyStore - The keystore for use with the trust store.
        +
        Returns:
        +
        The SSLContext.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLContext

        +
        public static javax.net.ssl.SSLContext getSSLContext(java.lang.String algorithmName,
        +                                                     java.security.KeyStore unifiedKeyStore,
        +                                                     char[] keyStorePassword)
        +                                              throws SSLUtilityException
        +
        Gets the SSL context merged with the JRE Trust Store using a unified KeyStore.
        +
        +
        Parameters:
        +
        algorithmName - The name of the context protocol or null for the JRE Default (TLSv1).
        +
        unifiedKeyStore - The keystore for use with the private and trust stores.
        +
        keyStorePassword - The password of the key store or null (Use "changeit" for JKS keystore defaults).
        +
        Returns:
        +
        The SSLContext.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLContext

        +
        public static javax.net.ssl.SSLContext getSSLContext(java.lang.String algorithmName,
        +                                                     java.security.KeyStore privateKeyStore,
        +                                                     char[] privateKeyStorePassword,
        +                                                     java.security.KeyStore trustKeyStore)
        +                                              throws SSLUtilityException
        +
        Gets the SSL context merged with the JRE Trust Store using separate private and trust KeyStores.
        +
        +
        Parameters:
        +
        algorithmName - The name of the context protocol or null for the JRE Default (TLSv1).
        +
        privateKeyStore - The keystore for use with the private store.
        +
        privateKeyStorePassword - The password of the private key store or null (Use "changeit" for JKS keystore defaults).
        +
        trustKeyStore - The keystore for use with the trust store.
        +
        Returns:
        +
        The SSLContext.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLClientSocket

        +
        public static javax.net.ssl.SSLSocket getSSLClientSocket(javax.net.ssl.SSLContext sslContext,
        +                                                         java.lang.String host,
        +                                                         int port)
        +                                                  throws SSLUtilityException
        +
        Creates a new SSLSocket using the specified SSLContext, host and port.
        +
        +
        Parameters:
        +
        sslContext - The SSL Context to create the socket from.
        +
        host - The host to connect to.
        +
        port - The port to connect to.
        +
        Returns:
        +
        The SSLSocket.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        upgradeClientSocketToSSL

        +
        public static javax.net.ssl.SSLSocket upgradeClientSocketToSSL(javax.net.ssl.SSLContext sslContext,
        +                                                               java.net.Socket socket,
        +                                                               java.lang.String host,
        +                                                               int port,
        +                                                               boolean autoClose)
        +                                                        throws SSLUtilityException
        +
        Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed. + This socket is in client mode (Upgrade for client side).
        +
        +
        Parameters:
        +
        sslContext - The SSL Context to create the socket from.
        +
        socket - The socket to wrap.
        +
        host - The host to "connect" to.
        +
        port - The port to "connect" to.
        +
        autoClose - If the underlying socket should be closed when the returned socket is closed.
        +
        Returns:
        +
        The SSLSocket.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        upgradeClientSocketToSSL

        +
        public static javax.net.ssl.SSLSocket upgradeClientSocketToSSL(javax.net.ssl.SSLContext sslContext,
        +                                                               java.net.Socket socket,
        +                                                               java.lang.String host,
        +                                                               int port,
        +                                                               boolean autoClose,
        +                                                               boolean onClient)
        +                                                        throws SSLUtilityException
        +
        Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed.
        +
        +
        Parameters:
        +
        sslContext - The SSL Context to create the socket from.
        +
        socket - The socket to wrap.
        +
        host - The host to "connect" to.
        +
        port - The port to "connect" to.
        +
        autoClose - If the underlying socket should be closed when the returned socket is closed.
        +
        onClient - Is this being called on the client side.
        +
        Returns:
        +
        The SSLSocket.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      + + + +
        +
      • +

        getSSLServerSocket

        +
        public static javax.net.ssl.SSLServerSocket getSSLServerSocket(javax.net.ssl.SSLContext sslContext,
        +                                                               int port,
        +                                                               int backlog,
        +                                                               java.net.InetAddress ifAddress)
        +                                                        throws SSLUtilityException
        +
        Gets the SSL Server socket for the specified SSLContext, port, backlog and InetAddress.
        +
        +
        Parameters:
        +
        sslContext - The SSL Context to create the socket from.
        +
        port - The port to listen on.
        +
        backlog - The number of connections that can be queued.
        +
        ifAddress - The network interface to listen on (null means listen on all network interfaces).
        +
        Returns:
        +
        The SSLServerSocket.
        +
        Throws:
        +
        SSLUtilityException - An Exception has occurred.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilityException.html b/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilityException.html new file mode 100644 index 0000000..7f0d363 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/ssl/SSLUtilityException.html @@ -0,0 +1,336 @@ + + + + + +SSLUtilityException + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.ssl
+

Class SSLUtilityException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public class SSLUtilityException
    +extends java.lang.Exception
    +
    This class provides the SSL Utility exception wrapper class. + See Throwable.getCause() to find out the underlying exception.
    +
    +
    Author:
    +
    Captain ALM
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      SSLUtilityException(java.lang.String message) +
      Constructs a new exception with the specified detail message.
      +
      SSLUtilityException(java.lang.String message, + java.lang.Throwable cause) +
      Constructs a new exception with the specified detail message and + cause.
      +
      SSLUtilityException(java.lang.Throwable cause) +
      Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause).
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SSLUtilityException

        +
        public SSLUtilityException(java.lang.String message)
        +
        Constructs a new exception with the specified detail message. The + cause is not initialized, and may subsequently be initialized by + a call to Throwable.initCause(java.lang.Throwable).
        +
        +
        Parameters:
        +
        message - the detail message. The detail message is saved for + later retrieval by the Throwable.getMessage() method.
        +
        +
      • +
      + + + +
        +
      • +

        SSLUtilityException

        +
        public SSLUtilityException(java.lang.String message,
        +                           java.lang.Throwable cause)
        +
        Constructs a new exception with the specified detail message and + cause.

        Note that the detail message associated with + cause is not automatically incorporated in + this exception's detail message.

        +
        +
        Parameters:
        +
        message - the detail message (which is saved for later retrieval + by the Throwable.getMessage() method).
        +
        cause - the cause (which is saved for later retrieval by the + Throwable.getCause() method). (A null value is + permitted, and indicates that the cause is nonexistent or + unknown.)
        +
        Since:
        +
        1.4
        +
        +
      • +
      + + + +
        +
      • +

        SSLUtilityException

        +
        public SSLUtilityException(java.lang.Throwable cause)
        +
        Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause). + This constructor is useful for exceptions that are little more than + wrappers for other throwables (for example, PrivilegedActionException).
        +
        +
        Parameters:
        +
        cause - the cause (which is saved for later retrieval by the + Throwable.getCause() method). (A null value is + permitted, and indicates that the cause is nonexistent or + unknown.)
        +
        Since:
        +
        1.4
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/ssl/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-frame.html new file mode 100644 index 0000000..046d3b2 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-frame.html @@ -0,0 +1,24 @@ + + + + + +com.captainalm.lib.calmnet.ssl + + + + + +

com.captainalm.lib.calmnet.ssl

+
+

Classes

+ +

Exceptions

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/ssl/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-summary.html new file mode 100644 index 0000000..919cbe3 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-summary.html @@ -0,0 +1,175 @@ + + + + + +com.captainalm.lib.calmnet.ssl + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.ssl

+
+
This package provides SSL utilities for wrapping + Sockets and creating SSLContexts.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.ssl Description

+
This package provides SSL utilities for wrapping + Sockets and creating SSLContexts.
+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/ssl/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-tree.html new file mode 100644 index 0000000..90c322b --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/ssl/package-tree.html @@ -0,0 +1,144 @@ + + + + + +com.captainalm.lib.calmnet.ssl Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.ssl

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/LengthClampedInputStream.html b/JavaDoc/com/captainalm/lib/calmnet/stream/LengthClampedInputStream.html new file mode 100644 index 0000000..e094aa5 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/LengthClampedInputStream.html @@ -0,0 +1,478 @@ + + + + + +LengthClampedInputStream + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.stream
+

Class LengthClampedInputStream

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    +
    public class LengthClampedInputStream
    +extends java.io.FilterInputStream
    +
    This class provides the ability to limit the number of bytes read from the underlying stream. + When the limit is reached, this class considers that state as end of stream.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      LengthClampedInputStream(java.io.InputStream inputStream, + int length) +
      Creates a LengthClampedInputStream with the specified InputStream + and the maximum number of bytes that can be read from the stream.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      intavailable() +
      Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + caller of a method for this input stream.
      +
      voidclose() +
      Closes this input stream and releases any system resources + associated with the stream.
      +
      voidmark(int readlimit) +
      Marks the current position in this input stream.
      +
      intread() +
      Reads the next byte of data from this input stream.
      +
      voidreset() +
      Repositions this stream to the position at the time the + mark method was last called on this input stream.
      +
      voidsetClampedLength(int clampedLength) +
      Sets a new clamped length value.
      +
      +
        +
      • + + +

        Methods inherited from class java.io.FilterInputStream

        +markSupported, read, read, skip
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        LengthClampedInputStream

        +
        public LengthClampedInputStream(java.io.InputStream inputStream,
        +                                int length)
        +
        Creates a LengthClampedInputStream with the specified InputStream + and the maximum number of bytes that can be read from the stream.
        +
        +
        Parameters:
        +
        inputStream - The input stream to clamp.
        +
        length - The maximum number of bytes that can be read before end of stream is reached.
        +
        Throws:
        +
        java.lang.NullPointerException - inputStream is null.
        +
        java.lang.IllegalArgumentException - length is less than 0.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

        +
        public int read()
        +         throws java.io.IOException
        +
        Reads the next byte of data from this input stream. The value + byte is returned as an int in the range + 0 to 255. If no byte is available + because the end of the stream has been reached, the value + -1 is returned. This method blocks until input data + is available, the end of the stream is detected, or an exception + is thrown.
        +
        +
        Overrides:
        +
        read in class java.io.FilterInputStream
        +
        Returns:
        +
        the next byte of data, or -1 if the end of the + stream is reached.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        available

        +
        public int available()
        +              throws java.io.IOException
        +
        Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + caller of a method for this input stream. The next caller might be + the same thread or another thread. A single read or skip of this + many bytes will not block, but may read or skip fewer bytes.
        +
        +
        Overrides:
        +
        available in class java.io.FilterInputStream
        +
        Returns:
        +
        an estimate of the number of bytes that can be read (or skipped + over) from this input stream without blocking.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        mark

        +
        public void mark(int readlimit)
        +
        Marks the current position in this input stream. A subsequent + call to the reset method repositions this stream at + the last marked position so that subsequent reads re-read the same bytes. +

        + The readlimit argument tells this input stream to + allow that many bytes to be read before the mark position gets + invalidated.

        +
        +
        Overrides:
        +
        mark in class java.io.FilterInputStream
        +
        Parameters:
        +
        readlimit - the maximum limit of bytes that can be read before + the mark position becomes invalid.
        +
        +
      • +
      + + + +
        +
      • +

        reset

        +
        public void reset()
        +           throws java.io.IOException
        +
        Repositions this stream to the position at the time the + mark method was last called on this input stream. +

        + Stream marks are intended to be used in + situations where you need to read ahead a little to see what's in + the stream. Often this is most easily done by invoking some + general parser. If the stream is of the type handled by the + parse, it just chugs along happily. If the stream is not of + that type, the parser should toss an exception when it fails. + If this happens within readlimit bytes, it allows the outer + code to reset the stream and try another parser.

        +
        +
        Overrides:
        +
        reset in class java.io.FilterInputStream
        +
        Throws:
        +
        java.io.IOException - if the stream has not been marked, if the + mark has been invalidated or marking is not supported.
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws java.io.IOException
        +
        Closes this input stream and releases any system resources + associated with the stream.
        +
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Overrides:
        +
        close in class java.io.FilterInputStream
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        setClampedLength

        +
        public void setClampedLength(int clampedLength)
        +
        Sets a new clamped length value. + This is the maximum number of bytes that can be read from the stream.
        +
        +
        Parameters:
        +
        clampedLength - The new clamped length value.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - clampedLength is less than 0.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkInputStream.html b/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkInputStream.html new file mode 100644 index 0000000..1c228d0 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkInputStream.html @@ -0,0 +1,679 @@ + + + + + +NetworkInputStream + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.stream
+

Class NetworkInputStream

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.lang.AutoCloseable
    +
    +
    +
    +
    public class NetworkInputStream
    +extends java.io.InputStream
    +
    This class provides a Network Input stream for either Sockets or DatagramSockets.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      NetworkInputStream(java.net.DatagramSocket socketIn) +
      Constructs a new NetworkInputStream with the specified DatagramSocket.
      +
      NetworkInputStream(java.net.Socket socketIn) +
      Constructs a new NetworkInputStream with the specified Socket.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      intavailable() +
      Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + invocation of a method for this input stream.
      +
      voidclose() +
      Closes this input stream and releases any system resources associated + with the stream.
      +
      java.net.InetAddressgetAddress() +
      Gets the current InetAddress of the stream.
      +
      java.net.DatagramSocketgetDatagramSocket() +
      Gets the datagram socket in use or null.
      +
      java.net.InetAddressgetLocalAddress() +
      Gets the local InetAddress of the stream.
      +
      java.lang.IntegergetLocalPort() +
      Gets the local port of the stream.
      +
      intgetPacketSize() +
      Gets the current datagram packet size.
      +
      java.lang.IntegergetPort() +
      Gets the current port of the stream.
      +
      java.net.SocketgetSocket() +
      Gets the socket in use or null.
      +
      intread() +
      Reads the next byte of data from the input stream.
      +
      byte[]readPacket() +
      Reads a single datagram packet.
      +
      intreadPacket(byte[] b) +
      Reads a single datagram packet into the specified buffer storing with no offset.
      +
      intreadPacket(byte[] b, + int off, + int len) +
      Reads a single datagram packet into the specified buffer + storing from the specified offset and the specified number of bytes.
      +
      voidsetDatagramSocket(java.net.DatagramSocket socketIn) +
      Sets the datagram socket in use.
      +
      voidsetSocket(java.net.Socket socketIn) +
      Sets the socket in use.
      +
      +
        +
      • + + +

        Methods inherited from class java.io.InputStream

        +mark, markSupported, read, read, reset, skip
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkInputStream

        +
        public NetworkInputStream(java.net.Socket socketIn)
        +
        Constructs a new NetworkInputStream with the specified Socket.
        +
        +
        Parameters:
        +
        socketIn - The socket to use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        +
      • +
      + + + +
        +
      • +

        NetworkInputStream

        +
        public NetworkInputStream(java.net.DatagramSocket socketIn)
        +
        Constructs a new NetworkInputStream with the specified DatagramSocket.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        read

        +
        public int read()
        +         throws java.io.IOException
        +
        Reads the next byte of data from the input stream. The value byte is + returned as an int in the range 0 to + 255. If no byte is available because the end of the stream + has been reached, the value -1 is returned. This method + blocks until input data is available, the end of the stream is detected, + or an exception is thrown.
        +
        +
        Specified by:
        +
        read in class java.io.InputStream
        +
        Returns:
        +
        the next byte of data, or -1 if the end of the + stream is reached.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        readPacket

        +
        public byte[] readPacket()
        +                  throws java.io.IOException
        +
        Reads a single datagram packet.
        +
        +
        Returns:
        +
        A byte array of the single datagram packet.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs, stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        readPacket

        +
        public int readPacket(byte[] b)
        +               throws java.io.IOException
        +
        Reads a single datagram packet into the specified buffer storing with no offset.
        +
        +
        Parameters:
        +
        b - The buffer to store the packet in.
        +
        Returns:
        +
        The number of bytes stored or -1 for end of stream.
        +
        Throws:
        +
        java.lang.NullPointerException - b is null.
        +
        java.io.IOException - if an I/O error occurs, stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        readPacket

        +
        public int readPacket(byte[] b,
        +                      int off,
        +                      int len)
        +               throws java.io.IOException
        +
        Reads a single datagram packet into the specified buffer + storing from the specified offset and the specified number of bytes.
        +
        +
        Parameters:
        +
        b - The buffer to store the packet in.
        +
        off - The offset to store in the buffer from.
        +
        len - The number of bytes to store in the buffer.
        +
        Returns:
        +
        The number of bytes stored or -1 for end of stream.
        +
        Throws:
        +
        java.lang.NullPointerException - b is null.
        +
        java.lang.IndexOutOfBoundsException - if off is negative, len is negative, or len is greater than the difference of the length of the buffer and off.
        +
        java.io.IOException - if an I/O error occurs, stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        getPacketSize

        +
        public int getPacketSize()
        +                  throws java.io.IOException
        +
        Gets the current datagram packet size.
        +
        +
        Returns:
        +
        The datagram packet size.
        +
        Throws:
        +
        java.io.IOException - stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        getAddress

        +
        public java.net.InetAddress getAddress()
        +
        Gets the current InetAddress of the stream. + Can be null.
        +
        +
        Returns:
        +
        The address.
        +
        +
      • +
      + + + +
        +
      • +

        getPort

        +
        public java.lang.Integer getPort()
        +
        Gets the current port of the stream. + Can be -1.
        +
        +
        Returns:
        +
        The current port.
        +
        +
      • +
      + + + +
        +
      • +

        getLocalAddress

        +
        public java.net.InetAddress getLocalAddress()
        +
        Gets the local InetAddress of the stream. + Can be null.
        +
        +
        Returns:
        +
        The local address.
        +
        +
      • +
      + + + +
        +
      • +

        getLocalPort

        +
        public java.lang.Integer getLocalPort()
        +
        Gets the local port of the stream. + Can be -1.
        +
        +
        Returns:
        +
        The local port.
        +
        +
      • +
      + + + +
        +
      • +

        getSocket

        +
        public java.net.Socket getSocket()
        +
        Gets the socket in use or null.
        +
        +
        Returns:
        +
        The socket in use or null.
        +
        +
      • +
      + + + +
        +
      • +

        setSocket

        +
        public void setSocket(java.net.Socket socketIn)
        +               throws java.io.IOException
        +
        Sets the socket in use.
        +
        +
        Parameters:
        +
        socketIn - The socket to now use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        java.io.IOException - stream closed or not using a socket.
        +
        +
      • +
      + + + +
        +
      • +

        getDatagramSocket

        +
        public java.net.DatagramSocket getDatagramSocket()
        +
        Gets the datagram socket in use or null.
        +
        +
        Returns:
        +
        The datagram socket in use or null.
        +
        +
      • +
      + + + +
        +
      • +

        setDatagramSocket

        +
        public void setDatagramSocket(java.net.DatagramSocket socketIn)
        +                       throws java.io.IOException
        +
        Sets the datagram socket in use.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to now use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        java.io.IOException - stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        available

        +
        public int available()
        +              throws java.io.IOException
        +
        Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + invocation of a method for this input stream. The next invocation + might be the same thread or another thread. A single read or skip of this + many bytes will not block, but may read or skip fewer bytes.
        +
        +
        Overrides:
        +
        available in class java.io.InputStream
        +
        Returns:
        +
        an estimate of the number of bytes that can be read (or skipped + over) from this input stream without blocking or 0 when + it reaches the end of the input stream.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws java.io.IOException
        +
        Closes this input stream and releases any system resources associated + with the stream. The underlying socket is closed.
        +
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Overrides:
        +
        close in class java.io.InputStream
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkOutputStream.html b/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkOutputStream.html new file mode 100644 index 0000000..08bb362 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/NetworkOutputStream.html @@ -0,0 +1,700 @@ + + + + + +NetworkOutputStream + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.captainalm.lib.calmnet.stream
+

Class NetworkOutputStream

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    +
    +
    +
    +
    public class NetworkOutputStream
    +extends java.io.OutputStream
    +
    This class provides a Network Output stream for either Sockets or DatagramSockets.
    +
    +
    Author:
    +
    Captain ALM
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      NetworkOutputStream(java.net.DatagramSocket socketIn) +
      Constructs a new NetworkOutputStream with the specified DatagramSocket.
      +
      NetworkOutputStream(java.net.DatagramSocket socketIn, + int size) +
      Constructs a new NetworkOutputStream with the specified DatagramSocket and datagram buffer size.
      +
      NetworkOutputStream(java.net.DatagramSocket socketIn, + int size, + java.net.InetAddress address, + int port) +
      Constructs a new NetworkOutputStream with the specified DatagramSocket, datagram buffer size, InetAddress target and port target.
      +
      NetworkOutputStream(java.net.Socket socketIn) +
      Constructs a new NetworkOutputStream with the specified Socket.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleancanDatagramBufferBeSet() +
      Gets if the setDatagramBufferSize(int) can be used.
      +
      voidclose() +
      Closes this output stream and releases any system resources + associated with this stream.
      +
      voidflush() +
      Flushes this output stream and forces any buffered output bytes + to be written out.
      +
      java.net.InetAddressgetAddress() +
      Gets the current InetAddress of the stream.
      +
      java.net.DatagramSocketgetDatagramSocket() +
      Gets the datagram socket in use or null.
      +
      java.net.InetAddressgetLocalAddress() +
      Gets the local InetAddress of the stream.
      +
      java.lang.IntegergetLocalPort() +
      Gets the local port of the stream.
      +
      java.lang.IntegergetPort() +
      Gets the current port of the stream.
      +
      java.net.SocketgetSocket() +
      Gets the socket in use or null.
      +
      voidsetDatagramBufferSize(int size) +
      Sets the buffer size for sending datagrams.
      +
      voidsetDatagramSocket(java.net.DatagramSocket socketIn) +
      Sets the datagram socket in use.
      +
      voidsetDatagramTarget(java.net.InetAddress address, + int port) +
      Sets the datagram target InetAddress and port.
      +
      voidsetSocket(java.net.Socket socketIn) +
      Sets the socket in use.
      +
      voidwrite(int b) +
      Writes the specified byte to this output stream.
      +
      +
        +
      • + + +

        Methods inherited from class java.io.OutputStream

        +write, write
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NetworkOutputStream

        +
        public NetworkOutputStream(java.net.Socket socketIn)
        +
        Constructs a new NetworkOutputStream with the specified Socket.
        +
        +
        Parameters:
        +
        socketIn - The socket to use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        +
      • +
      + + + +
        +
      • +

        NetworkOutputStream

        +
        public NetworkOutputStream(java.net.DatagramSocket socketIn)
        +
        Constructs a new NetworkOutputStream with the specified DatagramSocket.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        +
      • +
      + + + +
        +
      • +

        NetworkOutputStream

        +
        public NetworkOutputStream(java.net.DatagramSocket socketIn,
        +                           int size)
        +
        Constructs a new NetworkOutputStream with the specified DatagramSocket and datagram buffer size.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        size - The size of the buffer.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        java.lang.IllegalArgumentException - size is less than 1 or greater than 65535.
        +
        +
      • +
      + + + +
        +
      • +

        NetworkOutputStream

        +
        public NetworkOutputStream(java.net.DatagramSocket socketIn,
        +                           int size,
        +                           java.net.InetAddress address,
        +                           int port)
        +
        Constructs a new NetworkOutputStream with the specified DatagramSocket, datagram buffer size, InetAddress target and port target.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to use.
        +
        size - The size of the buffer.
        +
        address - The target address to set to.
        +
        port - The target port to set to.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn or address is null.
        +
        java.lang.IllegalArgumentException - size is less than 1 or greater than 65535 or port is less than 0 or greater than 65535.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        canDatagramBufferBeSet

        +
        public boolean canDatagramBufferBeSet()
        +
        Gets if the setDatagramBufferSize(int) can be used.
        +
        +
        Returns:
        +
        If the datagram buffer size can be set.
        +
        +
      • +
      + + + +
        +
      • +

        setDatagramBufferSize

        +
        public void setDatagramBufferSize(int size)
        +                           throws java.io.IOException
        +
        Sets the buffer size for sending datagrams.
        +
        +
        Parameters:
        +
        size - The size to set to.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - size is less than 1 or greater than 65535.
        +
        java.io.IOException - a datagram socket is not in use, buffer index is not null or the stream is closed.
        +
        +
      • +
      + + + +
        +
      • +

        setDatagramTarget

        +
        public void setDatagramTarget(java.net.InetAddress address,
        +                              int port)
        +                       throws java.io.IOException
        +
        Sets the datagram target InetAddress and port.
        +
        +
        Parameters:
        +
        address - The address to set to.
        +
        port - The port to set to.
        +
        Throws:
        +
        java.lang.NullPointerException - address is null.
        +
        java.lang.IllegalArgumentException - port is less than 0 or greater than 65535.
        +
        java.io.IOException - a datagram socket is not in use or the stream is closed.
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        public void write(int b)
        +           throws java.io.IOException
        +
        Writes the specified byte to this output stream. The general + contract for write is that one byte is written + to the output stream. The byte to be written is the eight + low-order bits of the argument b. The 24 + high-order bits of b are ignored.
        +
        +
        Specified by:
        +
        write in class java.io.OutputStream
        +
        Parameters:
        +
        b - the byte.
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs. In particular, + an IOException will be thrown if the + output stream has been closed.
        +
        +
      • +
      + + + +
        +
      • +

        getAddress

        +
        public java.net.InetAddress getAddress()
        +
        Gets the current InetAddress of the stream. + Can be null.
        +
        +
        Returns:
        +
        The address.
        +
        +
      • +
      + + + +
        +
      • +

        getPort

        +
        public java.lang.Integer getPort()
        +
        Gets the current port of the stream. + Can be -1.
        +
        +
        Returns:
        +
        The current port.
        +
        +
      • +
      + + + +
        +
      • +

        getLocalAddress

        +
        public java.net.InetAddress getLocalAddress()
        +
        Gets the local InetAddress of the stream. + Can be null.
        +
        +
        Returns:
        +
        The local address.
        +
        +
      • +
      + + + +
        +
      • +

        getLocalPort

        +
        public java.lang.Integer getLocalPort()
        +
        Gets the local port of the stream. + Can be -1.
        +
        +
        Returns:
        +
        The local port.
        +
        +
      • +
      + + + +
        +
      • +

        getSocket

        +
        public java.net.Socket getSocket()
        +
        Gets the socket in use or null.
        +
        +
        Returns:
        +
        The socket in use or null.
        +
        +
      • +
      + + + +
        +
      • +

        setSocket

        +
        public void setSocket(java.net.Socket socketIn)
        +               throws java.io.IOException
        +
        Sets the socket in use.
        +
        +
        Parameters:
        +
        socketIn - The socket to now use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        java.io.IOException - stream closed or not using a socket.
        +
        +
      • +
      + + + +
        +
      • +

        getDatagramSocket

        +
        public java.net.DatagramSocket getDatagramSocket()
        +
        Gets the datagram socket in use or null.
        +
        +
        Returns:
        +
        The datagram socket in use or null.
        +
        +
      • +
      + + + +
        +
      • +

        setDatagramSocket

        +
        public void setDatagramSocket(java.net.DatagramSocket socketIn)
        +                       throws java.io.IOException
        +
        Sets the datagram socket in use.
        +
        +
        Parameters:
        +
        socketIn - The datagram socket to now use.
        +
        Throws:
        +
        java.lang.NullPointerException - socketIn is null.
        +
        java.io.IOException - stream closed or not using a datagram socket.
        +
        +
      • +
      + + + +
        +
      • +

        flush

        +
        public void flush()
        +           throws java.io.IOException
        +
        Flushes this output stream and forces any buffered output bytes + to be written out. The general contract of flush is + that calling it is an indication that, if any bytes previously + written have been buffered by the implementation of the output + stream, such bytes should immediately be written to their + intended destination.
        +
        +
        Specified by:
        +
        flush in interface java.io.Flushable
        +
        Overrides:
        +
        flush in class java.io.OutputStream
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws java.io.IOException
        +
        Closes this output stream and releases any system resources + associated with this stream. The general contract of close + is that it closes the output stream. A closed stream cannot perform + output operations and cannot be reopened. The underlying socket is closed.
        +
        +
        Specified by:
        +
        close in interface java.io.Closeable
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Overrides:
        +
        close in class java.io.OutputStream
        +
        Throws:
        +
        java.io.IOException - if an I/O error occurs.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/package-frame.html b/JavaDoc/com/captainalm/lib/calmnet/stream/package-frame.html new file mode 100644 index 0000000..29be9a5 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/package-frame.html @@ -0,0 +1,22 @@ + + + + + +com.captainalm.lib.calmnet.stream + + + + + +

com.captainalm.lib.calmnet.stream

+
+

Classes

+ +
+ + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/package-summary.html b/JavaDoc/com/captainalm/lib/calmnet/stream/package-summary.html new file mode 100644 index 0000000..2d915a2 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/package-summary.html @@ -0,0 +1,167 @@ + + + + + +com.captainalm.lib.calmnet.stream + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.captainalm.lib.calmnet.stream

+
+
This package provides streams for network packet streaming.
+
+

See: Description

+
+
+ + + + +

Package com.captainalm.lib.calmnet.stream Description

+
This package provides streams for network packet streaming.
+
+
Author:
+
Captain ALM
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/com/captainalm/lib/calmnet/stream/package-tree.html b/JavaDoc/com/captainalm/lib/calmnet/stream/package-tree.html new file mode 100644 index 0000000..bae0857 --- /dev/null +++ b/JavaDoc/com/captainalm/lib/calmnet/stream/package-tree.html @@ -0,0 +1,149 @@ + + + + + +com.captainalm.lib.calmnet.stream Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.captainalm.lib.calmnet.stream

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/constant-values.html b/JavaDoc/constant-values.html new file mode 100644 index 0000000..acae834 --- /dev/null +++ b/JavaDoc/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/deprecated-list.html b/JavaDoc/deprecated-list.html new file mode 100644 index 0000000..b09d04a --- /dev/null +++ b/JavaDoc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/help-doc.html b/JavaDoc/help-doc.html new file mode 100644 index 0000000..2b74811 --- /dev/null +++ b/JavaDoc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-1.html b/JavaDoc/index-files/index-1.html new file mode 100644 index 0000000..8ee2578 --- /dev/null +++ b/JavaDoc/index-files/index-1.html @@ -0,0 +1,189 @@ + + + + + +A-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

A

+
+
accept - Variable in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
+
Whether the candidate should be accepted.
+
+
address - Variable in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
+
The remote address of the candidate.
+
+
allocationSuccessful() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Checks if the allocation is successful.
+
+
areFinishedIDsWaiting() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets whether finished IDs are waiting for obtaining.
+
+
areFinishedIDsWaiting() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets whether finished IDs are waiting for obtaining.
+
+
areInvalidPacketsAllowed() - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Gets whether invalid packets are allowed to be read and written.
+
+
arePacketsBeingRead() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Are IPackets being read.
+
+
arePacketsWaiting() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets whether packets are waiting to be received.
+
+
arePacketsWaiting() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets whether packets are waiting for allocation.
+
+
areReceivedPacketsWaiting() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets if there are received IPackets.
+
+
areSecretsSent() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets if secrets are sent as part of cipher settings.
+
+
areStreamPacketsPreferred() - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+ +
+
areStreamPacketsPreferred() - Method in interface com.captainalm.lib.calmnet.packet.factory.IPacketFactory
+
+
Gets if getPacket(PacketProtocolInformation) prefers returning IStreamedPackets if possible.
+
+
available() - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + caller of a method for this input stream.
+
+
available() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + invocation of a method for this input stream.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-10.html b/JavaDoc/index-files/index-10.html new file mode 100644 index 0000000..1a75c9f --- /dev/null +++ b/JavaDoc/index-files/index-10.html @@ -0,0 +1,206 @@ + + + + + +L-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

L

+
+
LengthClampedInputStream - Class in com.captainalm.lib.calmnet.stream
+
+
This class provides the ability to limit the number of bytes read from the underlying stream.
+
+
LengthClampedInputStream(InputStream, int) - Constructor for class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Creates a LengthClampedInputStream with the specified InputStream + and the maximum number of bytes that can be read from the stream.
+
+
loadKeyStore(String, File, String) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Loads a Keystore of a certain type from a file given the password.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDAKNPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendStopPacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendVerifyCompletePacket
+
+
Loads the packet payload from save data.
+
+
loadPayload(byte[]) - Method in interface com.captainalm.lib.calmnet.packet.IPacket
+
+
Loads the packet payload from save data.
+
+
localAddress() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the local InetAddress.
+
+
localAddress() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Get the local InetAddress.
+
+
localPort() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the local port.
+
+
localPort() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Get the local port.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-11.html b/JavaDoc/index-files/index-11.html new file mode 100644 index 0000000..b00c2ef --- /dev/null +++ b/JavaDoc/index-files/index-11.html @@ -0,0 +1,137 @@ + + + + + +M-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

M

+
+
mark(int) - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Marks the current position in this input stream.
+
+
matchesNetMarshalClient(NetMarshalClient) - Method in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
+
Checks if this candidate matches an existing NetMarshalClient.
+
+
maximumFragmentAge - Variable in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+
The maximum age of fragments for a specified packet in seconds before those fragments are purged.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-12.html b/JavaDoc/index-files/index-12.html new file mode 100644 index 0000000..7860b7c --- /dev/null +++ b/JavaDoc/index-files/index-12.html @@ -0,0 +1,259 @@ + + + + + +N-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

N

+
+
NetMarshalClient - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides a managed way of networking on the client side.
+
+
NetMarshalClient(Socket, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Constructs a new NetMarshalClient with the specified Socket, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalClient(MulticastSocket, InetAddress, int, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Constructs a new NetMarshalClient with the specified MulticastSocket, multicast group InetAddress, multicast port, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalClient(DatagramSocket, InetAddress, int, InputStream, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Constructs a new NetMarshalClient with the specified DatagramSocket, remote InetAddress, remote port, InputStream, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalClient(DatagramSocket, InetAddress, int, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Constructs a new NetMarshalClient with the specified DatagramSocket, remote InetAddress, remote port, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalClientWrapped - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides a managed way of networking on the client side, allows stream wrapping.
+
+
NetMarshalClientWrapped(Socket, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Constructs a new NetMarshalClientWrapped with the specified Socket, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetMarshalClientWrapped(MulticastSocket, InetAddress, int, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Constructs a new NetMarshalClientWrapped with the specified MulticastSocket, multicast group InetAddress, multicast port, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetMarshalClientWrapped(DatagramSocket, InetAddress, int, InputStream, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Constructs a new NetMarshalClientWrapped with the specified DatagramSocket, remote InetAddress, remote port, InputStream, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetMarshalClientWrapped(DatagramSocket, InetAddress, int, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Constructs a new NetMarshalClientWrapped with the specified DatagramSocket, remote InetAddress, remote port, IPacketFactory, + PacketLoader, FragmentationOptions, Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetMarshalServer - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides a way of networking on the server side and holds a collection of NetMarshalClients.
+
+
NetMarshalServer(ServerSocket, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Constructs a new NetMarshalServer with the specified ServerSocket, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalServer(DatagramSocket, IPacketFactory, PacketLoader, FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Constructs a new NetMarshalServer with the specified DatagramSocket, IPacketFactory, PacketLoader and FragmentationOptions.
+
+
NetMarshalServerWrapped - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides a way of networking on the server side and holds a collection of NetMarshalClients, allows stream wrapping.
+
+
NetMarshalServerWrapped(ServerSocket, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalServerWrapped
+
+
Constructs a new NetMarshalServerWrapped with the specified ServerSocket, IPacketFactory, PacketLoader, FragmentationOptions, + Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetMarshalServerWrapped(DatagramSocket, IPacketFactory, PacketLoader, FragmentationOptions, Function<InputStream, InputStream>, Function<OutputStream, OutputStream>) - Constructor for class com.captainalm.lib.calmnet.marshal.NetMarshalServerWrapped
+
+
Constructs a new NetMarshalServerWrapped with the specified DatagramSocket, IPacketFactory, PacketLoader, FragmentationOptions, + Function for wrapping the input stream and the Function for wrapping the output stream.
+
+
NetworkEncryptionCipherPacket - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides the ability for supporting streams to negotiate a cipher.
+
+
NetworkEncryptionCipherPacket(Boolean, String[]) - Constructor for class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Constructs a new instance of NetworkEncryptionCipherPacket with the specified acknowledgement value and the specified ciphers.
+
+
NetworkEncryptionUpgradePacket - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides the ability for supporting streams to upgrade to using password encrypted and / or base64 connections.
+
+
NetworkEncryptionUpgradePacket(Boolean, boolean, boolean, ICipherFactory) - Constructor for class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Constructs a new NetworkEncryptionUpgradePacket with the specified acknowledgement value, upgrade value, base 64 value and ICipherFactory.
+
+
NetworkIdentifierPacket - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides a packet that is used to identify the type of network client is using this library.
+
+
NetworkIdentifierPacket(String) - Constructor for class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Constructs a new instance of NetworkIdentifierPacket with the specified ID.
+
+
NetworkInputStream - Class in com.captainalm.lib.calmnet.stream
+
+
This class provides a Network Input stream for either Sockets or DatagramSockets.
+
+
NetworkInputStream(Socket) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Constructs a new NetworkInputStream with the specified Socket.
+
+
NetworkInputStream(DatagramSocket) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Constructs a new NetworkInputStream with the specified DatagramSocket.
+
+
NetworkOutputStream - Class in com.captainalm.lib.calmnet.stream
+
+
This class provides a Network Output stream for either Sockets or DatagramSockets.
+
+
NetworkOutputStream(Socket) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Constructs a new NetworkOutputStream with the specified Socket.
+
+
NetworkOutputStream(DatagramSocket) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Constructs a new NetworkOutputStream with the specified DatagramSocket.
+
+
NetworkOutputStream(DatagramSocket, int) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Constructs a new NetworkOutputStream with the specified DatagramSocket and datagram buffer size.
+
+
NetworkOutputStream(DatagramSocket, int, InetAddress, int) - Constructor for class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Constructs a new NetworkOutputStream with the specified DatagramSocket, datagram buffer size, InetAddress target and port target.
+
+
NetworkSSLUpgradePacket - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides the ability for supporting streams to upgrade to using SSL connections.
+
+
NetworkSSLUpgradePacket(Boolean) - Constructor for class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Constructs a new NetworkSSLUpgrade packet with the specified acknowledgement value.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-13.html b/JavaDoc/index-files/index-13.html new file mode 100644 index 0000000..8a9184f --- /dev/null +++ b/JavaDoc/index-files/index-13.html @@ -0,0 +1,133 @@ + + + + + +O-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

O

+
+
open() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Opens the marshal.
+
+
open() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Opens the marshal.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-14.html b/JavaDoc/index-files/index-14.html new file mode 100644 index 0000000..fc32a85 --- /dev/null +++ b/JavaDoc/index-files/index-14.html @@ -0,0 +1,181 @@ + + + + + +P-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

P

+
+
PacketException - Exception in com.captainalm.lib.calmnet.packet
+
+
This class provides the packet exception wrapper class.
+
+
PacketException(String) - Constructor for exception com.captainalm.lib.calmnet.packet.PacketException
+
+
Constructs a new exception with the specified detail message.
+
+
PacketException(String, Throwable) - Constructor for exception com.captainalm.lib.calmnet.packet.PacketException
+
+
Constructs a new exception with the specified detail message and + cause.
+
+
PacketException(Throwable) - Constructor for exception com.captainalm.lib.calmnet.packet.PacketException
+
+
Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause).
+
+
PacketLoader - Class in com.captainalm.lib.calmnet.packet
+
+
This class provides the ability to load and save IPacket + to InputStream and OutputStream.
+
+
PacketLoader() - Constructor for class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Constructs a new Packet loader instance.
+
+
PacketLoader(DigestProvider) - Constructor for class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Constructs a new Packet loader instance with the specified DigestProvider.
+
+
PacketProtocolInformation - Class in com.captainalm.lib.calmnet.packet
+
+
This class provides the packet protocol information for IPacket.
+
+
PacketProtocolInformation() - Constructor for class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Constructs a new instance of PacketProtocolInformation.
+
+
PacketProtocolInformation(byte, byte) - Constructor for class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Constructs a new instance of PacketProtocolInformation.
+
+
pollLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Polls the last finished packet ID.
+
+
pollLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Polls the last finished packet ID.
+
+
port - Variable in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
+
The remote port of the candidate.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-15.html b/JavaDoc/index-files/index-15.html new file mode 100644 index 0000000..a3bd50e --- /dev/null +++ b/JavaDoc/index-files/index-15.html @@ -0,0 +1,231 @@ + + + + + +R-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

R

+
+
read() - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Reads the next byte of data from this input stream.
+
+
read() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Reads the next byte of data from the input stream.
+
+
readArrayFromInputStream(InputStream, int) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads in a byte array of a specified length from an InputStream.
+
+
readByteFromInputStream(InputStream) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a byte from an InputStream.
+
+
readData(OutputStream) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Reads payload data to an OutputStream.
+
+
readData(OutputStream) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Reads payload data to an OutputStream.
+
+
readData(OutputStream) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Reads payload data to an OutputStream.
+
+
readData(OutputStream) - Method in interface com.captainalm.lib.calmnet.packet.IStreamedPacket
+
+
Reads payload data to an OutputStream.
+
+
readInteger(InputStream) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads an Integer from an InputStream.
+
+
readPacket(InputStream, IPacketFactory, PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a IPacket from an input stream.
+
+
readPacket() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Reads a single datagram packet.
+
+
readPacket(byte[]) - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Reads a single datagram packet into the specified buffer storing with no offset.
+
+
readPacket(byte[], int, int) - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Reads a single datagram packet into the specified buffer + storing from the specified offset and the specified number of bytes.
+
+
readPacketNoDigest(byte[], IPacketFactory, PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a IPacket from a byte array (No digest support).
+
+
readPacketNoDigest(InputStream, IPacketFactory, PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a IPacket from an input stream (No digest support).
+
+
readStreamedPacket(InputStream, IPacketFactory, PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a IStreamedPacket from an input stream.
+
+
readStreamedPacketNoDigest(InputStream, IPacketFactory, PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Reads a IStreamedPacket from an input stream (No digest support).
+
+
receivePacket() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Receives a IPacket.
+
+
receivePacket() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Receives a IPacket from the FragmentReceiver.
+
+
receivePacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Receives a IPacket into the FragmentReceiver.
+
+
receivePacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Receives a IPacket into the FragmentSender.
+
+
receivePacketPolled() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Receives a IPacket polled.
+
+
receivePacketPolling() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Receives a IPacket from the FragmentReceiver.
+
+
remoteAddress() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the remote InetAddress.
+
+
remotePort() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the remote port.
+
+
reset() - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Repositions this stream to the position at the time the + mark method was last called on this input stream.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-16.html b/JavaDoc/index-files/index-16.html new file mode 100644 index 0000000..30e3051 --- /dev/null +++ b/JavaDoc/index-files/index-16.html @@ -0,0 +1,481 @@ + + + + + +S-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

S

+
+
savePacketProtocolInformation(OutputStream, PacketProtocolInformation) - Static method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Saves the PacketProtocolInformation of the packet.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessagePacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDAKNPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendStopPacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendVerifyCompletePacket
+
+
Saves the packet payload to a byte array.
+
+
savePayload() - Method in interface com.captainalm.lib.calmnet.packet.IPacket
+
+
Saves the packet payload to a byte array.
+
+
sendPacket(IPacket, boolean) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Sends a IPacket.
+
+
sendPacket() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Sends the current IPackets from the FragmentReceiver.
+
+
sendPacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Sends a IPacket using this FragmentSender.
+
+
sendPacket() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Sends the current IPackets from the FragmentSender.
+
+
setAcceptExceptionBiConsumer(BiConsumer<Exception, NetMarshalServer>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the BiConsumer accept exception consumer.
+
+
setAllowInvalidPackets(boolean) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
This sets whether invalid packets are allowed to be read and written.
+
+
setBase64ed(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Sets if base64 is used.
+
+
setCacheUsed(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Sets if the encrypted data is cached.
+
+
setCacheUsed(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets if the encrypted data is cached.
+
+
setCacheUsed(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Sets if the cipher information is cached.
+
+
setCacheUsed(boolean) - Method in interface com.captainalm.lib.calmnet.packet.IInternalCache
+
+
Sets if the internal cache is used.
+
+
setCipherFactory(ICipherFactory) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets the ICipherFactory being used.
+
+
setCipherFactory(ICipherFactory) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Sets the ICipherFactory being used.
+
+
setCipherFactory(ICipherFactory) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Sets the ICipherFactory in use.
+
+
setCiphers(String[]) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Sets the cipher names this packet contains.
+
+
setClampedLength(int) - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Sets a new clamped length value.
+
+
setClientAcceptanceBiConsumer(BiConsumer<CandidateClient, NetMarshalServer>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the BiConsumer client acceptance consumer.
+
+
setClosedConsumer(Consumer<NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Sets the Consumer closed consumer.
+
+
setClosedConsumer(Consumer<NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the Consumer closed consumer.
+
+
setDatagramBufferSize(int) - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Sets the buffer size for sending datagrams.
+
+
setDatagramSocket(DatagramSocket) - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Sets the datagram socket in use.
+
+
setDatagramSocket(DatagramSocket) - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Sets the datagram socket in use.
+
+
setDatagramTarget(InetAddress, int) - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Sets the datagram target InetAddress and port.
+
+
setFactory(IPacketFactory) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Sets the IPacketFactory to use.
+
+
setFactory(IPacketFactory) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets the IPacketFactory to use.
+
+
setHeldPacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Sets the held packet.
+
+
setHeldPacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets the held packet.
+
+
setIfSecretsSent(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Sets if secrets should be sent as part of cipher settings.
+
+
setNumberOfEmptySendsTillForcedCompleteOrResend(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Sets the number of FragmentReceiver.sendPacket() calls, that return null, to a registry entry are made before + the FragmentSendCompletePacket or FragmentRetrySendPacket packets are sent.
+
+
setOpenedConsumer(Consumer<NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the Consumer opened consumer.
+
+
setPacket(IPacket) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactoryWithPacket
+
+
Sets the IPacket in use.
+
+
setPacketFactory(IPacketFactory) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Sets the IPacketFactory in use (null signifies to use the same instance).
+
+
setPacketFactory(IPacketFactory) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Sets the IPacketFactory to use.
+
+
setPacketLoader(PacketLoader) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Sets the PacketLoader to use.
+
+
setPacketLoader(PacketLoader) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets the PacketLoader to use.
+
+
setPacketLoader(PacketLoader) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Sets the PacketLoader to use.
+
+
setPacketLoader(PacketLoader) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Sets the PacketLoader to use.
+
+
setPacketLoader(PacketLoader) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Sets the PacketLoader to use.
+
+
setPacketsShouldBeRead(boolean) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Set if IPackets should be read.
+
+
setReceiveBiConsumer(BiConsumer<IPacket, NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Sets the BiConsumer receiver consumer.
+
+
setReceiveBiConsumer(BiConsumer<IPacket, NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the BiConsumer receiver consumer.
+
+
setReceiveExceptionBiConsumer(BiConsumer<Exception, NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Sets the BiConsumer receive exception consumer.
+
+
setReceiveExceptionBiConsumer(BiConsumer<Exception, NetMarshalClient>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the BiConsumer receive exception consumer.
+
+
setResponseVerification(boolean) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Sets whether responses should be verified.
+
+
setResponseVerification(boolean) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Sets whether responses should be verified.
+
+
setSentDataWillBeAllVerified(boolean) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets whether all sent fragments are verified to be equal.
+
+
setSentDataWillBeAllVerified(boolean) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets whether all sent fragments are verified to be equal.
+
+
setSocket(Socket) - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Sets the socket in use.
+
+
setSocket(Socket) - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Sets the socket in use.
+
+
setSocketSetupBiConsumer(BiConsumer<Socket, NetMarshalServer>) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Sets the BiConsumer socket setup consumer.
+
+
setSplitSize(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Sets the packet split size in bytes.
+
+
setStreamPacketsPreferred(boolean) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+ +
+
setStreamPacketsPreferred(boolean) - Method in interface com.captainalm.lib.calmnet.packet.factory.IPacketFactory
+
+
Sets if getPacket(PacketProtocolInformation) prefers returning IStreamedPackets if possible.
+
+
setTrailingPassword(String) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Sets the trailing password (Use null for no trailing password).
+
+
setUpgrade(boolean) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Sets if the packet is treated as a stream upgrade or + a change in packet use for EncryptedPacket and Base64Packet.
+
+
setupReceiver(FragmentReceiver) - Method in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+
Sets-up the provided FragmentReceiver with parameters.
+
+
setupSender(FragmentSender) - Method in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+
Sets-up the provided FragmentSender with parameters.
+
+
shouldSentDataBeAllVerified() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets whether all sent fragments are verified to be equal.
+
+
shouldSentDataBeAllVerified() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets whether all sent fragments are verified to be equal.
+
+
shouldVerifyResponses() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets whether responses should be verified.
+
+
shouldVerifyResponses() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets whether responses should be verified.
+
+
sslUpgradeClientSide(SSLContext, String) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Performs SSL socket upgrades on client side (Use for constructed sockets).
+
+
sslUpgradeServerSide(SSLContext) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Performs SSL socket upgrades on server side (Use for accepted sockets).
+
+
SSLUtilities - Class in com.captainalm.lib.calmnet.ssl
+
+
This class provides SSL utilities to create SSLContext and SSLSocket + objects using JKS files (Or other supported formats).
+
+
SSLUtilities() - Constructor for class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
 
+
SSLUtilityException - Exception in com.captainalm.lib.calmnet.ssl
+
+
This class provides the SSL Utility exception wrapper class.
+
+
SSLUtilityException(String) - Constructor for exception com.captainalm.lib.calmnet.ssl.SSLUtilityException
+
+
Constructs a new exception with the specified detail message.
+
+
SSLUtilityException(String, Throwable) - Constructor for exception com.captainalm.lib.calmnet.ssl.SSLUtilityException
+
+
Constructs a new exception with the specified detail message and + cause.
+
+
SSLUtilityException(Throwable) - Constructor for exception com.captainalm.lib.calmnet.ssl.SSLUtilityException
+
+
Constructs a new exception with the specified cause and a detail + message of (cause==null ? null : cause.toString()) (which + typically contains the class and detail message of cause).
+
+
stopAllDataVerificationAndCompleteReceive() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Stops data verification for all packets being received when FragmentReceiver.shouldSentDataBeAllVerified() is true.
+
+
stopAllDataVerificationAndCompleteSend() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Stops data verification for all packets being sent when FragmentSender.shouldSentDataBeAllVerified() is true.
+
+
stopDataVerificationAndCompleteReceive(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Stops data verification for the specified Packet ID when FragmentReceiver.shouldSentDataBeAllVerified() is true.
+
+
stopDataVerificationAndCompleteSend(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Stops data verification for the specified Packet ID when FragmentSender.shouldSentDataBeAllVerified() is true.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-17.html b/JavaDoc/index-files/index-17.html new file mode 100644 index 0000000..b5a014d --- /dev/null +++ b/JavaDoc/index-files/index-17.html @@ -0,0 +1,135 @@ + + + + + +U-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

U

+
+
upgradeClientSocketToSSL(SSLContext, Socket, String, int, boolean) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed.
+
+
upgradeClientSocketToSSL(SSLContext, Socket, String, int, boolean, boolean) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Upgrades an existing Socket to an SSLSocket using the specified SSLContext, + Socket, host, port and if the specified socket should be closed when the returned socket is closed.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-18.html b/JavaDoc/index-files/index-18.html new file mode 100644 index 0000000..18eeddf --- /dev/null +++ b/JavaDoc/index-files/index-18.html @@ -0,0 +1,135 @@ + + + + + +V-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

V

+
+
validate() - Method in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+
Validates the parameters within this structure.
+
+
verifyFragments - Variable in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+ +
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-19.html b/JavaDoc/index-files/index-19.html new file mode 100644 index 0000000..88e0d53 --- /dev/null +++ b/JavaDoc/index-files/index-19.html @@ -0,0 +1,161 @@ + + + + + +W-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

W

+
+
write(int) - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Writes the specified byte to this output stream.
+
+
writeData(InputStream, int) - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Writes payload data from an InputStream.
+
+
writeData(InputStream, int) - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Writes payload data from an InputStream.
+
+
writeData(InputStream, int) - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Writes payload data from an InputStream.
+
+
writeData(InputStream, int) - Method in interface com.captainalm.lib.calmnet.packet.IStreamedPacket
+
+
Writes payload data from an InputStream.
+
+
writeInteger(OutputStream, int) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Writes an Integer to the OutputStream using 4 bytes.
+
+
writePacket(OutputStream, IPacket, boolean) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Writes a IPacket to an output stream (No digest support).
+
+
writePacketNoDigest(IPacket, boolean) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Returns a IPacket to a byte array (No digest support).
+
+
writePacketNoDigest(OutputStream, IPacket, boolean) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Writes a IPacket to an output stream.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-2.html b/JavaDoc/index-files/index-2.html new file mode 100644 index 0000000..21338bf --- /dev/null +++ b/JavaDoc/index-files/index-2.html @@ -0,0 +1,151 @@ + + + + + +B-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

B

+
+
Base64Packet - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides a base64 encrypted packet that can hold an IPacket.
+
+
Base64Packet(IPacketFactory, PacketLoader) - Constructor for class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Constructs a new Base64Packet with the specified IPacketFactory and PacketLoader.
+
+
Base64Packet(IPacketFactory, PacketLoader, boolean) - Constructor for class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader + and if the encrypted data should be cached.
+
+
Base64Packet(IPacketFactory, PacketLoader, IPacket) - Constructor for class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader and IPacket.
+
+
Base64Packet(IPacketFactory, PacketLoader, IPacket, boolean) - Constructor for class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Constructs a new Base64Packet with the specified IPacketFactory, PacketLoader, + IPacket and if the encrypted data should be cached.
+
+
broadcastPacket(IPacket, boolean) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Broadcasts a IPacket.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-3.html b/JavaDoc/index-files/index-3.html new file mode 100644 index 0000000..c6671cf --- /dev/null +++ b/JavaDoc/index-files/index-3.html @@ -0,0 +1,247 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

C

+
+
CALMNETPacketFactory - Class in com.captainalm.lib.calmnet.packet.factory
+
+
This class provides a standard extensible IPacketFactory for calmnet packets.
+
+
CALMNETPacketFactory(boolean, PacketLoader) - Constructor for class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Constructs a new Instance of CALMNETPacketFactory with if IStreamedPackets are preferred and the specified PacketLoader.
+
+
CALMNETPacketFactory(boolean, PacketLoader, IPacketFactory) - Constructor for class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Constructs a new Instance of CALMNETPacketFactory with if IStreamedPackets are preferred, the specified PacketLoader and the IPacketFactory.
+
+
CALMNETPacketFactoryWithPacket - Class in com.captainalm.lib.calmnet.packet.factory
+
+
This class provides a standard extensible IPacketFactory for calmnet packets + with the ability to set the IPacket of supporting packets.
+
+
CALMNETPacketFactoryWithPacket(boolean, PacketLoader) - Constructor for class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactoryWithPacket
+
+
Constructs a new Instance of CALMNETPacketFactoryWithPacket with if IStreamedPackets are preferred and the specified PacketLoader.
+
+
CALMNETPacketFactoryWithPacket(boolean, PacketLoader, IPacketFactory) - Constructor for class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactoryWithPacket
+
+
Constructs a new Instance of CALMNETPacketFactoryWithPacket with if IStreamedPackets are preferred, the specified PacketLoader and the IPacketFactory.
+
+
canDatagramBufferBeSet() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+ +
+
CandidateClient - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides a candidate client for NetMarshalServers.
+
+
CandidateClient(InetAddress, int) - Constructor for class com.captainalm.lib.calmnet.marshal.CandidateClient
+
+
Constructs a new instance of CandidateClient with an address and port.
+
+
clearFragmentStorage() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Clears the fragment storage registries if fragmentation is enabled.
+
+
clearLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Clears all the last finished packet IDs.
+
+
clearLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Clears all the last finished packet IDs.
+
+
clearRegistry() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Clears the registry (And requests the sender to stop sending).
+
+
clearRegistry() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Clears the registry.
+
+
clearWaitingPackets() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Clears the currently waiting packets.
+
+
clearWaitingPackets() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Clears the currently waiting packets.
+
+
close() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Closes the marshal, closing all its streams.
+
+
close() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Closes the marshal, closing all the connected clients.
+
+
close() - Method in class com.captainalm.lib.calmnet.stream.LengthClampedInputStream
+
+
Closes this input stream and releases any system resources + associated with the stream.
+
+
close() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Closes this input stream and releases any system resources associated + with the stream.
+
+
close() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Closes this output stream and releases any system resources + associated with this stream.
+
+
com.captainalm.lib.calmnet.marshal - package com.captainalm.lib.calmnet.marshal
+
+
This package contains the network marshals for managed sending of IPackets on sockets.
+
+
com.captainalm.lib.calmnet.packet - package com.captainalm.lib.calmnet.packet
+
+
This package contains the network packets and handling code.
+
+
com.captainalm.lib.calmnet.packet.core - package com.captainalm.lib.calmnet.packet.core
+
+
This package contains the core network packets.
+
+
com.captainalm.lib.calmnet.packet.factory - package com.captainalm.lib.calmnet.packet.factory
+
+
This package contains the IPacketFactory interface and standard classes.
+
+
com.captainalm.lib.calmnet.packet.fragment - package com.captainalm.lib.calmnet.packet.fragment
+
+
This package contains the fragment network packets and + the FragmentReceiver and FragmentSender objects.
+
+
com.captainalm.lib.calmnet.ssl - package com.captainalm.lib.calmnet.ssl
+
+
This package provides SSL utilities for wrapping + Sockets and creating SSLContexts.
+
+
com.captainalm.lib.calmnet.stream - package com.captainalm.lib.calmnet.stream
+
+
This package provides streams for network packet streaming.
+
+
connect(InetAddress, int, int) - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Connects to a remote endpoint.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-4.html b/JavaDoc/index-files/index-4.html new file mode 100644 index 0000000..d117334 --- /dev/null +++ b/JavaDoc/index-files/index-4.html @@ -0,0 +1,137 @@ + + + + + +D-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

D

+
+
deletePacketFromRegistry(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Deletes a packet from the registry and requests the sender to stop sending.
+
+
deletePacketFromRegistry(int) - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Deletes a packet from the registry.
+
+
disconnectAll() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Disconnects all the clients (By closing them).
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-5.html b/JavaDoc/index-files/index-5.html new file mode 100644 index 0000000..45c95ae --- /dev/null +++ b/JavaDoc/index-files/index-5.html @@ -0,0 +1,164 @@ + + + + + +E-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

E

+
+
emptySendsTillForced - Variable in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+ +
+
EncryptedPacket - Class in com.captainalm.lib.calmnet.packet.core
+
+
This class provides an encrypted packet that can hold an IPacket.
+
+
EncryptedPacket(IPacketFactory, PacketLoader, ICipherFactory) - Constructor for class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader and ICipherFactory.
+
+
EncryptedPacket(IPacketFactory, PacketLoader, ICipherFactory, boolean) - Constructor for class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory + and if the encrypted data should be cached.
+
+
EncryptedPacket(IPacketFactory, PacketLoader, ICipherFactory, IPacket) - Constructor for class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory and IPacket.
+
+
EncryptedPacket(IPacketFactory, PacketLoader, ICipherFactory, IPacket, boolean) - Constructor for class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Constructs a new EncryptedPacket with the specified IPacketFactory, PacketLoader, ICipherFactory, + IPacket and if the encrypted data should be cached.
+
+
equalityVerifyFragments - Variable in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+ +
+
equals(Object) - Method in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
 
+
equals(Object) - Method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Gets whether this object equals the passed object.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-6.html b/JavaDoc/index-files/index-6.html new file mode 100644 index 0000000..c30b5ab --- /dev/null +++ b/JavaDoc/index-files/index-6.html @@ -0,0 +1,266 @@ + + + + + +F-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

F

+
+
flush() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Flushes the output streams.
+
+
flush() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Flushes all the output streams on all the clients.
+
+
flush() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Flushes this output stream and forces any buffered output bytes + to be written out.
+
+
FragmentAllocatePacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for fragment allocation requesting.
+
+
FragmentAllocatePacket(Integer, UUID) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Constructs a new FragmentAllocatePacket given the fragment count and allocation UUID.
+
+
FragmentAllocationPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for giving the allocated packetID + as a response for FragmentAllocatePacket.
+
+
FragmentAllocationPacket(Integer, UUID, Boolean) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Constructs a new FragmentAllocationPacket given the packet ID, allocation ID and if it's successful.
+
+
FragmentationOptions - Class in com.captainalm.lib.calmnet.marshal
+
+
This class provides fragmentation options for using FragmentSenders and + FragmentReceivers in this package.
+
+
FragmentationOptions() - Constructor for class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
 
+
FragmentationOptions(FragmentationOptions) - Constructor for class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+
Creates a copy of the provided FragmentationOptions.
+
+
fragmentationSplitSize - Variable in class com.captainalm.lib.calmnet.marshal.FragmentationOptions
+
+ +
+
FragmentMessagePacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for sending a payload with a packetID and fragmentID.
+
+
FragmentMessagePacket(Integer, Integer, byte[]) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentMessagePacket
+
+
Constructs a new FragmentMessagePacket given the packet ID, fragment ID and payload.
+
+
FragmentMessageResponsePacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for sending an optional payload with a packetID and fragmentID + as a response for FragmentMessagePacket.
+
+
FragmentMessageResponsePacket(Integer, Integer, byte[]) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentMessageResponsePacket
+
+
Constructs a new FragmentMessageResponsePacket given the packet ID, fragment ID and payload.
+
+
FragmentPIDAKNPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This abstract base class provides the ability for packets to contain an ID and if it is an Acknowledgement.
+
+
FragmentPIDAKNPacket(Integer, Boolean) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDAKNPacket
+
+
Constructs a new FragmentPIDPacket given the packet ID and the acknowledgement value.
+
+
FragmentPIDMSGPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This abstract base class provides the ability for packets to contain an ID, a Fragment ID and a payload.
+
+
FragmentPIDMSGPacket(Integer, Integer, byte[]) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Constructs a new FragmentPIDMSGPacket given the packet ID, fragment ID and payload.
+
+
FragmentPIDPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This abstract base class provides the ability for packets to return an ID.
+
+
FragmentPIDPacket(Integer) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDPacket
+
+
Constructs a new FragmentPIDPacket given the packet ID.
+
+
FragmentReceiver - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides the ability to re-construct packets from com.captainalm.lib.calmnet.packet.fragment.
+
+
FragmentReceiver(PacketLoader, IPacketFactory) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Constructs a new FragmentReceiver with the specified PacketLoader and IPacketFactory.
+
+
FragmentRetrySendPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for signalling that the sending end + should start re-sending un acknowledged fragment packets.
+
+
FragmentRetrySendPacket(Integer, Boolean) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentRetrySendPacket
+
+
Constructs a new FragmentRetrySendPacket given the packet ID and the acknowledgement value.
+
+
FragmentSendCompletePacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for signalling that all fragments for a packet have been sent or that sending has been successfully cancelled.
+
+
FragmentSendCompletePacket(Integer, Boolean) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentSendCompletePacket
+
+
Constructs a new FragmentSendCompletePacket given the packet ID and the acknowledgement value.
+
+
FragmentSender - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides the ability to create packets for com.captainalm.lib.calmnet.packet.fragment.
+
+
FragmentSender(PacketLoader) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Constructs a new FragmentSender with the specified PacketLoader.
+
+
FragmentSender(PacketLoader, int) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Constructs a new FragmentSender with the specified PacketLoader + and packet split size in bytes.
+
+
FragmentSendStopPacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for stopping the remote FragmentSender.
+
+
FragmentSendStopPacket(Integer) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentSendStopPacket
+
+
Constructs a new FragmentSendStopPacket given the packet ID.
+
+
FragmentSendVerifyCompletePacket - Class in com.captainalm.lib.calmnet.packet.fragment
+
+
This class provides a packet for stating that all packets have been successfully sent and verified.
+
+
FragmentSendVerifyCompletePacket(Integer) - Constructor for class com.captainalm.lib.calmnet.packet.fragment.FragmentSendVerifyCompletePacket
+
+
Constructs a new FragmentSendVerifyCompletePacket given the packet ID.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-7.html b/JavaDoc/index-files/index-7.html new file mode 100644 index 0000000..71b2a35 --- /dev/null +++ b/JavaDoc/index-files/index-7.html @@ -0,0 +1,582 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

G

+
+
getAcceptExceptionBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the BiConsumer accept exception consumer.
+
+
getAddress() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the current InetAddress of the stream.
+
+
getAddress() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the current InetAddress of the stream.
+
+
getAllocationID() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Gets the allocation ID or null.
+
+
getAllocationID() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Gets the allocation ID or null.
+
+
getByteArrayFromInteger(int) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Saves an Integer into a byte array.
+
+
getCipherFactory() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the ICipherFactory being used.
+
+
getCipherFactory() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets the ICipherFactory being used or null.
+
+
getCipherFactory() - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Gets the ICipherFactory in use (Could be the same instance).
+
+
getCiphers() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets the cipher names this packet contains.
+
+
getClientAcceptanceBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the BiConsumer client acceptance consumer.
+
+
getClosedConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the Consumer closed consumer.
+
+
getClosedConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the Consumer closed consumer.
+
+
getConnectedClients() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the current set of connected NetMarshalClients.
+
+
getDatagramSocket() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the datagram socket in use or null.
+
+
getDatagramSocket() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the datagram socket in use or null.
+
+
getFactory() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the IPacketFactory in use.
+
+
getFactory() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the IPacketFactory in use.
+
+
getFragmentationOptions() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the FragmentationOptions of the client.
+
+
getFragmentationOptions() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the FragmentationOptions of the client.
+
+
getFragmentCount() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Gets the number of fragments or null.
+
+
getFragmentID() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Gets the fragment ID or null.
+
+
getFragmentMessage() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Gets the fragment message byte array or null.
+
+
getHashProvider() - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
This field provides the DigestProvider to use for the payload of the packets on the trailer.
+
+
getHeldPacket() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the held packet or null.
+
+
getHeldPacket() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the held packet or null.
+
+
getInputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the input stream.
+
+
getIntegerFromByteArray(byte[]) - Static method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Loads an Integer from a byte array.
+
+
getLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets the last finished packet ID.
+
+
getLastIDFinished() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets the last finished packet ID.
+
+
getLocalAddress() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the local InetAddress of the stream.
+
+
getLocalAddress() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the local InetAddress of the stream.
+
+
getLocalPort() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the local port of the stream.
+
+
getLocalPort() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the local port of the stream.
+
+
getMajor() - Method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Gets the major protocol for the packet.
+
+
getMinor() - Method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Gets the minor protocol for the packet.
+
+
getNumberOfEmptySendsTillForcedCompleteOrResend() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets the number of FragmentReceiver.sendPacket() calls, that return null, to a registry entry are made before + the FragmentSendCompletePacket or FragmentRetrySendPacket packets are sent.
+
+
getOpenedConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the Consumer opened consumer.
+
+
getOutputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the output stream.
+
+
getPacket(PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Constructs a IPacket of the protocol specified by the passed PacketProtocolInformation instance.
+
+
getPacket(PacketProtocolInformation) - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactoryWithPacket
+
+
Constructs a IPacket of the protocol specified by the passed PacketProtocolInformation instance.
+
+
getPacket() - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactoryWithPacket
+
+
Gets the IPacket in use (Could be the same instance).
+
+
getPacket(PacketProtocolInformation) - Method in interface com.captainalm.lib.calmnet.packet.factory.IPacketFactory
+
+
Constructs a IPacket of the protocol specified by the passed PacketProtocolInformation instance.
+
+
getPacketFactory() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the packet factory in use.
+
+
getPacketFactory() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the packet factory in use.
+
+
getPacketFactory() - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Gets the IPacketFactory in use (Could be the same instance).
+
+
getPacketFactory() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets the IPacketFactory in use.
+
+
getPacketID() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDPacket
+
+
Gets the packet ID or null.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the packet loader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the packet loader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the PacketLoader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the PacketLoader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.packet.factory.CALMNETPacketFactory
+
+
Gets the PacketLoader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver
+
+
Gets the PacketLoader in use.
+
+
getPacketLoader() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets the PacketLoader in use.
+
+
getPacketSize(IPacket, boolean, boolean) - Method in class com.captainalm.lib.calmnet.packet.PacketLoader
+
+
Gets the total size of a written packet in bytes.
+
+
getPacketSize() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the current datagram packet size.
+
+
getPort() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the current port of the stream.
+
+
getPort() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the current port of the stream.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessagePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessageResponsePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentRetrySendPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendCompletePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendStopPacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendVerifyCompletePacket
+
+
Gets the protocol information.
+
+
getProtocol() - Method in interface com.captainalm.lib.calmnet.packet.IPacket
+
+
Gets the protocol information.
+
+
getProtocolInformation(InputStream) - Static method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Gets the PacketProtocolInformation of the packet.
+
+
getReceiveBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the BiConsumer receiver consumer.
+
+
getReceiveBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the BiConsumer receiver consumer.
+
+
getReceiveExceptionBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets the BiConsumer receive exception consumer.
+
+
getReceiveExceptionBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the BiConsumer receive exception consumer.
+
+
getRootInputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the root input stream.
+
+
getRootOutputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Get the root output stream.
+
+
getSize() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the size of the output data.
+
+
getSize() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the size of the output data.
+
+
getSize() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets the size of the output data.
+
+
getSize() - Method in interface com.captainalm.lib.calmnet.packet.IStreamedPacket
+
+
Gets the size of the output data.
+
+
getSocket() - Method in class com.captainalm.lib.calmnet.stream.NetworkInputStream
+
+
Gets the socket in use or null.
+
+
getSocket() - Method in class com.captainalm.lib.calmnet.stream.NetworkOutputStream
+
+
Gets the socket in use or null.
+
+
getSocketSetupBiConsumer() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets the BiConsumer socket setup consumer.
+
+
getSplitSize() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSender
+
+
Gets the current packet split size in bytes.
+
+
getSSLClientSocket(SSLContext, String, int) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Creates a new SSLSocket using the specified SSLContext, host and port.
+
+
getSSLContext(String, KeyStore, char[]) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Gets the SSL context merged with the JRE Trust Store using a unified KeyStore.
+
+
getSSLContext(String, KeyStore, char[], KeyStore) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Gets the SSL context merged with the JRE Trust Store using separate private and trust KeyStores.
+
+
getSSLContextNoJRETrust(String, KeyStore, char[]) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Gets the SSL context without the JRE Trust Store using a unified KeyStore.
+
+
getSSLContextNoJRETrust(String, KeyStore, char[], KeyStore) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Gets the SSL context without the JRE Trust Store using separate private and trust KeyStores.
+
+
getSSLServerSocket(SSLContext, int, int, InetAddress) - Static method in class com.captainalm.lib.calmnet.ssl.SSLUtilities
+
+
Gets the SSL Server socket for the specified SSLContext, port, backlog and InetAddress.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessagePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessageResponsePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentRetrySendPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendCompletePacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendStopPacket
+
+
Gets the protocol information statically.
+
+
getTheProtocol() - Static method in class com.captainalm.lib.calmnet.packet.fragment.FragmentSendVerifyCompletePacket
+
+
Gets the protocol information statically.
+
+
getTrailingPassword() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets the trailing password (Or null if no trailing password).
+
+
getWrapperInputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Gets the Function input stream wrapper function.
+
+
getWrapperInputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServerWrapped
+
+
Gets the Function input stream wrapper function.
+
+
getWrapperOutputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClientWrapped
+
+
Gets the Function output stream wrapper function.
+
+
getWrapperOutputStream() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServerWrapped
+
+
Gets the Function output stream wrapper function.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-8.html b/JavaDoc/index-files/index-8.html new file mode 100644 index 0000000..d1ccf41 --- /dev/null +++ b/JavaDoc/index-files/index-8.html @@ -0,0 +1,131 @@ + + + + + +H-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

H

+
+
hashCode() - Method in class com.captainalm.lib.calmnet.marshal.CandidateClient
+
 
+
hashCode() - Method in class com.captainalm.lib.calmnet.packet.PacketProtocolInformation
+
+
Gets the hash code of the object.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index-files/index-9.html b/JavaDoc/index-files/index-9.html new file mode 100644 index 0000000..1e6942f --- /dev/null +++ b/JavaDoc/index-files/index-9.html @@ -0,0 +1,255 @@ + + + + + +I-Index + + + + + + + + +
+ + + + + + + +
+ + +
A B C D E F G H I L M N O P R S U V W  + + +

I

+
+
IAcknowledgement - Interface in com.captainalm.lib.calmnet.packet
+
+
This interface allows obtaining if the class instance is an Acknowledgement.
+
+
IInternalCache - Interface in com.captainalm.lib.calmnet.packet
+
+
This interface allows getting and setting if the + internal cache should be used within a class instance.
+
+
IPacket - Interface in com.captainalm.lib.calmnet.packet
+
+
This interface provides the packet methods.
+
+
IPacketFactory - Interface in com.captainalm.lib.calmnet.packet.factory
+
+
This interface provides the ability to construct IPackets given their PacketProtocolInformation.
+
+
isAcknowledgement() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets if the class instance is an Acknowledgement.
+
+
isAcknowledgement() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets if the class instance is an Acknowledgement.
+
+
isAcknowledgement() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Gets if the class instance is an Acknowledgement.
+
+
isAcknowledgement() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDAKNPacket
+
+
Gets if the class instance is an Acknowledgement.
+
+
isAcknowledgement() - Method in interface com.captainalm.lib.calmnet.packet.IAcknowledgement
+
+
Gets if the class instance is an Acknowledgement.
+
+
isBase64ed() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets if base 64 is used.
+
+
isCacheUsed() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets if the encrypted data is cached.
+
+
isCacheUsed() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets if the encrypted data is cached.
+
+
isCacheUsed() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets if the cipher information is cached.
+
+
isCacheUsed() - Method in interface com.captainalm.lib.calmnet.packet.IInternalCache
+
+
Gets if the internal cache is used.
+
+
isRunning() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets if the marshal is running.
+
+
isRunning() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalServer
+
+
Gets if the marshal is running.
+
+
isSSLUpgraded() - Method in class com.captainalm.lib.calmnet.marshal.NetMarshalClient
+
+
Gets if the marshal is ssl upgraded.
+
+
IStreamedPacket - Interface in com.captainalm.lib.calmnet.packet
+
+
This interface provides the streaming packet methods.
+
+
isUpgrade() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets if the packet is treated as a stream upgrade or + a change in packet use for EncryptedPacket and Base64Packet.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.Base64Packet
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.EncryptedPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionCipherPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkEncryptionUpgradePacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkIdentifierPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.core.NetworkSSLUpgradePacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocatePacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentAllocationPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentMessagePacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDAKNPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDMSGPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in class com.captainalm.lib.calmnet.packet.fragment.FragmentPIDPacket
+
+
Gets if the packet is valid.
+
+
isValid() - Method in interface com.captainalm.lib.calmnet.packet.IPacket
+
+
Gets if the packet is valid.
+
+
+A B C D E F G H I L M N O P R S U V W 
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/index.html b/JavaDoc/index.html new file mode 100644 index 0000000..946e0dd --- /dev/null +++ b/JavaDoc/index.html @@ -0,0 +1,75 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/JavaDoc/overview-frame.html b/JavaDoc/overview-frame.html new file mode 100644 index 0000000..0bf24af --- /dev/null +++ b/JavaDoc/overview-frame.html @@ -0,0 +1,27 @@ + + + + + +Overview List + + + + + +
All Classes
+
+

Packages

+ +
+

 

+ + diff --git a/JavaDoc/overview-summary.html b/JavaDoc/overview-summary.html new file mode 100644 index 0000000..6132965 --- /dev/null +++ b/JavaDoc/overview-summary.html @@ -0,0 +1,173 @@ + + + + + +Overview + + + + + + + + +
+ + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
com.captainalm.lib.calmnet.marshal +
This package contains the network marshals for managed sending of IPackets on sockets.
+
com.captainalm.lib.calmnet.packet +
This package contains the network packets and handling code.
+
com.captainalm.lib.calmnet.packet.core +
This package contains the core network packets.
+
com.captainalm.lib.calmnet.packet.factory +
This package contains the IPacketFactory interface and standard classes.
+
com.captainalm.lib.calmnet.packet.fragment +
This package contains the fragment network packets and + the FragmentReceiver and FragmentSender objects.
+
com.captainalm.lib.calmnet.ssl +
This package provides SSL utilities for wrapping + Sockets and creating SSLContexts.
+
com.captainalm.lib.calmnet.stream +
This package provides streams for network packet streaming.
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/overview-tree.html b/JavaDoc/overview-tree.html new file mode 100644 index 0000000..5d06f19 --- /dev/null +++ b/JavaDoc/overview-tree.html @@ -0,0 +1,224 @@ + + + + + +Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/package-list b/JavaDoc/package-list new file mode 100644 index 0000000..9f1dc21 --- /dev/null +++ b/JavaDoc/package-list @@ -0,0 +1,7 @@ +com.captainalm.lib.calmnet.marshal +com.captainalm.lib.calmnet.packet +com.captainalm.lib.calmnet.packet.core +com.captainalm.lib.calmnet.packet.factory +com.captainalm.lib.calmnet.packet.fragment +com.captainalm.lib.calmnet.ssl +com.captainalm.lib.calmnet.stream diff --git a/JavaDoc/script.js b/JavaDoc/script.js new file mode 100644 index 0000000..c3a1cae --- /dev/null +++ b/JavaDoc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/JavaDoc/serialized-form.html b/JavaDoc/serialized-form.html new file mode 100644 index 0000000..2a488a4 --- /dev/null +++ b/JavaDoc/serialized-form.html @@ -0,0 +1,145 @@ + + + + + +Serialized Form + + + + + + + + +
+ + + + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/JavaDoc/stylesheet.css b/JavaDoc/stylesheet.css new file mode 100644 index 0000000..b8dad08 --- /dev/null +++ b/JavaDoc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +}