From 569c8a43e19dfba3eecd76b21725b6b7561f0976 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Tue, 14 Jun 2022 16:48:47 +0100 Subject: [PATCH] Update package organisation. --- .idea/uiDesigner.xml | 124 ++++++++++++++++++ .../lib/calmnet/packet/PacketLoader.java | 1 + .../lib/calmnet/packet/core/Base64Packet.java | 1 + .../calmnet/packet/core/EncryptedPacket.java | 1 + .../lib/calmnet/packet/core/package-info.java | 2 + .../{ => factory}/CALMNETPacketFactory.java | 6 +- .../CALMNETPacketFactoryWithPacket.java | 6 +- .../packet/{ => factory}/IPacketFactory.java | 6 +- .../calmnet/packet/factory/package-info.java | 6 + .../{ => fragment}/FragmentReceiver.java | 7 +- .../fragment/FragmentSendStopPacket.java | 1 - .../packet/{ => fragment}/FragmentSender.java | 5 +- .../calmnet/packet/fragment/package-info.java | 5 +- .../lib/calmnet/{ => ssl}/SSLUtilities.java | 2 +- .../{ => ssl}/SSLUtilityException.java | 2 +- .../lib/calmnet/ssl/package-info.java | 7 + 16 files changed, 172 insertions(+), 10 deletions(-) create mode 100644 .idea/uiDesigner.xml rename src/com/captainalm/lib/calmnet/packet/{ => factory}/CALMNETPacketFactory.java (93%) rename src/com/captainalm/lib/calmnet/packet/{ => factory}/CALMNETPacketFactoryWithPacket.java (88%) rename src/com/captainalm/lib/calmnet/packet/{ => factory}/IPacketFactory.java (80%) create mode 100644 src/com/captainalm/lib/calmnet/packet/factory/package-info.java rename src/com/captainalm/lib/calmnet/packet/{ => fragment}/FragmentReceiver.java (95%) rename src/com/captainalm/lib/calmnet/packet/{ => fragment}/FragmentSender.java (95%) rename src/com/captainalm/lib/calmnet/{ => ssl}/SSLUtilities.java (97%) rename src/com/captainalm/lib/calmnet/{ => ssl}/SSLUtilityException.java (95%) create mode 100644 src/com/captainalm/lib/calmnet/ssl/package-info.java diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..6d50cd4 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/captainalm/lib/calmnet/packet/PacketLoader.java b/src/com/captainalm/lib/calmnet/packet/PacketLoader.java index e4d601a..0c76108 100644 --- a/src/com/captainalm/lib/calmnet/packet/PacketLoader.java +++ b/src/com/captainalm/lib/calmnet/packet/PacketLoader.java @@ -1,5 +1,6 @@ package com.captainalm.lib.calmnet.packet; +import com.captainalm.lib.calmnet.packet.factory.IPacketFactory; import com.captainalm.lib.stdcrypt.digest.DigestComparer; import com.captainalm.lib.stdcrypt.digest.DigestProvider; diff --git a/src/com/captainalm/lib/calmnet/packet/core/Base64Packet.java b/src/com/captainalm/lib/calmnet/packet/core/Base64Packet.java index 2881761..9fba62b 100644 --- a/src/com/captainalm/lib/calmnet/packet/core/Base64Packet.java +++ b/src/com/captainalm/lib/calmnet/packet/core/Base64Packet.java @@ -1,6 +1,7 @@ package com.captainalm.lib.calmnet.packet.core; import com.captainalm.lib.calmnet.packet.*; +import com.captainalm.lib.calmnet.packet.factory.IPacketFactory; import com.captainalm.lib.calmnet.stream.LengthClampedInputStream; import java.io.IOException; diff --git a/src/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.java b/src/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.java index cee0e27..cf2061f 100644 --- a/src/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.java +++ b/src/com/captainalm/lib/calmnet/packet/core/EncryptedPacket.java @@ -1,6 +1,7 @@ package com.captainalm.lib.calmnet.packet.core; import com.captainalm.lib.calmnet.packet.*; +import com.captainalm.lib.calmnet.packet.factory.IPacketFactory; import com.captainalm.lib.calmnet.stream.LengthClampedInputStream; import com.captainalm.lib.stdcrypt.encryption.CipherException; import com.captainalm.lib.stdcrypt.encryption.ICipherFactory; diff --git a/src/com/captainalm/lib/calmnet/packet/core/package-info.java b/src/com/captainalm/lib/calmnet/packet/core/package-info.java index d6e7d13..4f62811 100644 --- a/src/com/captainalm/lib/calmnet/packet/core/package-info.java +++ b/src/com/captainalm/lib/calmnet/packet/core/package-info.java @@ -1,6 +1,8 @@ /** * This package contains the core network packets. + *

* Major ID: 255 + *

* * @author Captain ALM */ diff --git a/src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactory.java b/src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.java similarity index 93% rename from src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactory.java rename to src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.java index d6a38a4..3a1ec99 100644 --- a/src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactory.java +++ b/src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactory.java @@ -1,5 +1,9 @@ -package com.captainalm.lib.calmnet.packet; +package com.captainalm.lib.calmnet.packet.factory; +import com.captainalm.lib.calmnet.packet.IPacket; +import com.captainalm.lib.calmnet.packet.IStreamedPacket; +import com.captainalm.lib.calmnet.packet.PacketLoader; +import com.captainalm.lib.calmnet.packet.PacketProtocolInformation; import com.captainalm.lib.calmnet.packet.core.*; import com.captainalm.lib.calmnet.packet.fragment.*; import com.captainalm.lib.stdcrypt.encryption.ICipherFactory; diff --git a/src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactoryWithPacket.java b/src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.java similarity index 88% rename from src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactoryWithPacket.java rename to src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.java index 50fd2d6..917e570 100644 --- a/src/com/captainalm/lib/calmnet/packet/CALMNETPacketFactoryWithPacket.java +++ b/src/com/captainalm/lib/calmnet/packet/factory/CALMNETPacketFactoryWithPacket.java @@ -1,5 +1,9 @@ -package com.captainalm.lib.calmnet.packet; +package com.captainalm.lib.calmnet.packet.factory; +import com.captainalm.lib.calmnet.packet.IPacket; +import com.captainalm.lib.calmnet.packet.IStreamedPacket; +import com.captainalm.lib.calmnet.packet.PacketLoader; +import com.captainalm.lib.calmnet.packet.PacketProtocolInformation; import com.captainalm.lib.calmnet.packet.core.*; /** diff --git a/src/com/captainalm/lib/calmnet/packet/IPacketFactory.java b/src/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.java similarity index 80% rename from src/com/captainalm/lib/calmnet/packet/IPacketFactory.java rename to src/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.java index b902dc5..b8ff4b0 100644 --- a/src/com/captainalm/lib/calmnet/packet/IPacketFactory.java +++ b/src/com/captainalm/lib/calmnet/packet/factory/IPacketFactory.java @@ -1,4 +1,8 @@ -package com.captainalm.lib.calmnet.packet; +package com.captainalm.lib.calmnet.packet.factory; + +import com.captainalm.lib.calmnet.packet.IPacket; +import com.captainalm.lib.calmnet.packet.IStreamedPacket; +import com.captainalm.lib.calmnet.packet.PacketProtocolInformation; /** * This interface provides the ability to construct {@link IPacket}s given their {@link PacketProtocolInformation}. diff --git a/src/com/captainalm/lib/calmnet/packet/factory/package-info.java b/src/com/captainalm/lib/calmnet/packet/factory/package-info.java new file mode 100644 index 0000000..c2067b0 --- /dev/null +++ b/src/com/captainalm/lib/calmnet/packet/factory/package-info.java @@ -0,0 +1,6 @@ +/** + * This package contains the {@link com.captainalm.lib.calmnet.packet.factory.IPacketFactory} interface and standard classes. + * + * @author Captain ALM + */ +package com.captainalm.lib.calmnet.packet.factory; \ No newline at end of file diff --git a/src/com/captainalm/lib/calmnet/packet/FragmentReceiver.java b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.java similarity index 95% rename from src/com/captainalm/lib/calmnet/packet/FragmentReceiver.java rename to src/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.java index f914194..fb2f1e3 100644 --- a/src/com/captainalm/lib/calmnet/packet/FragmentReceiver.java +++ b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentReceiver.java @@ -1,6 +1,9 @@ -package com.captainalm.lib.calmnet.packet; +package com.captainalm.lib.calmnet.packet.fragment; -import com.captainalm.lib.calmnet.packet.fragment.*; +import com.captainalm.lib.calmnet.packet.IPacket; +import com.captainalm.lib.calmnet.packet.factory.IPacketFactory; +import com.captainalm.lib.calmnet.packet.PacketException; +import com.captainalm.lib.calmnet.packet.PacketLoader; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.java b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.java index 3203cff..5dfdc81 100644 --- a/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.java +++ b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSendStopPacket.java @@ -1,6 +1,5 @@ package com.captainalm.lib.calmnet.packet.fragment; -import com.captainalm.lib.calmnet.packet.FragmentSender; import com.captainalm.lib.calmnet.packet.PacketException; import com.captainalm.lib.calmnet.packet.PacketProtocolInformation; diff --git a/src/com/captainalm/lib/calmnet/packet/FragmentSender.java b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.java similarity index 95% rename from src/com/captainalm/lib/calmnet/packet/FragmentSender.java rename to src/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.java index d529254..f7c405e 100644 --- a/src/com/captainalm/lib/calmnet/packet/FragmentSender.java +++ b/src/com/captainalm/lib/calmnet/packet/fragment/FragmentSender.java @@ -1,5 +1,8 @@ -package com.captainalm.lib.calmnet.packet; +package com.captainalm.lib.calmnet.packet.fragment; +import com.captainalm.lib.calmnet.packet.IPacket; +import com.captainalm.lib.calmnet.packet.PacketException; +import com.captainalm.lib.calmnet.packet.PacketLoader; import com.captainalm.lib.calmnet.packet.fragment.*; import java.util.*; diff --git a/src/com/captainalm/lib/calmnet/packet/fragment/package-info.java b/src/com/captainalm/lib/calmnet/packet/fragment/package-info.java index f178eb5..7fb0a76 100644 --- a/src/com/captainalm/lib/calmnet/packet/fragment/package-info.java +++ b/src/com/captainalm/lib/calmnet/packet/fragment/package-info.java @@ -1,6 +1,9 @@ /** - * This package contains the fragment network packets. + * This package contains the fragment network packets and + * the {@link com.captainalm.lib.calmnet.packet.fragment.FragmentReceiver} and {@link com.captainalm.lib.calmnet.packet.fragment.FragmentSender} objects. + *

* Major ID: 254 + *

* * @author Captain ALM */ diff --git a/src/com/captainalm/lib/calmnet/SSLUtilities.java b/src/com/captainalm/lib/calmnet/ssl/SSLUtilities.java similarity index 97% rename from src/com/captainalm/lib/calmnet/SSLUtilities.java rename to src/com/captainalm/lib/calmnet/ssl/SSLUtilities.java index c7d73c6..ea4c703 100644 --- a/src/com/captainalm/lib/calmnet/SSLUtilities.java +++ b/src/com/captainalm/lib/calmnet/ssl/SSLUtilities.java @@ -1,4 +1,4 @@ -package com.captainalm.lib.calmnet; +package com.captainalm.lib.calmnet.ssl; import javax.net.ssl.*; import java.io.File; diff --git a/src/com/captainalm/lib/calmnet/SSLUtilityException.java b/src/com/captainalm/lib/calmnet/ssl/SSLUtilityException.java similarity index 95% rename from src/com/captainalm/lib/calmnet/SSLUtilityException.java rename to src/com/captainalm/lib/calmnet/ssl/SSLUtilityException.java index 6df0e8b..16404fa 100644 --- a/src/com/captainalm/lib/calmnet/SSLUtilityException.java +++ b/src/com/captainalm/lib/calmnet/ssl/SSLUtilityException.java @@ -1,4 +1,4 @@ -package com.captainalm.lib.calmnet; +package com.captainalm.lib.calmnet.ssl; import java.security.PrivilegedActionException; diff --git a/src/com/captainalm/lib/calmnet/ssl/package-info.java b/src/com/captainalm/lib/calmnet/ssl/package-info.java new file mode 100644 index 0000000..9108785 --- /dev/null +++ b/src/com/captainalm/lib/calmnet/ssl/package-info.java @@ -0,0 +1,7 @@ +/** + * This package provides SSL utilities for wrapping + * {@link java.net.Socket}s and creating {@link javax.net.ssl.SSLContext}s. + * + * @author Captain ALM + */ +package com.captainalm.lib.calmnet.ssl; \ No newline at end of file