Project setup

This commit is contained in:
Matthias Guillitte
2025-11-26 14:52:03 +01:00
parent 21db96b617
commit 55f44355f0
13 changed files with 525 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package acq;
public class Main {
public static void main(String[] args) {
}
}

View File

@@ -0,0 +1,7 @@
package acs;
public class Main {
public static void main(String[] args) {
}
}

View File

@@ -0,0 +1,21 @@
package common;
public class Logger {
public static void displayInfo(String message){
final String BLUE = "\u001B[34m";
final String RESET = "\u001B[0m";
System.out.println(BLUE + "Info >>> " + message + RESET);
}
public static void displayReceived(String message){
String GREEN = "\u001B[32m";
String RESET = "\u001B[0m";
System.out.println(GREEN + "Received >>> " + message + RESET);
}
public static void displaySent(String message){
final String RED = "\u001B[31m";
final String RESET = "\u001B[0m";
System.out.println(RED + "Sent >>> " + message + RESET);
}
}

View File

@@ -0,0 +1,19 @@
package common;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
public class SocketManager {
public static void send(Socket socket, String data) throws IOException {
OutputStream output = socket.getOutputStream();
output.write(String.format("%s\r\n", data).getBytes(StandardCharsets.UTF_8));
output.flush();
}
public static String readResponse(BufferedReader reader) throws IOException {
return reader.readLine();
}
}

View File

@@ -0,0 +1,9 @@
package externalApp;
import common.Logger;
public class Main {
public static void main(String[] args) {
}
}

View File

@@ -0,0 +1,7 @@
package httpsServer;
public class Main {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}