system_out_제거

This commit is contained in:
cho
2026-03-03 14:04:32 +09:00
parent 3d6fe754da
commit 8c886f92fb
7 changed files with 33 additions and 33 deletions
File diff suppressed because one or more lines are too long
@@ -369,9 +369,9 @@ public class EAIServerManager implements Lifecycle {
} }
} }
public static void main(String[] args) throws Exception{ public static void main(String[] args) throws Exception{
System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[5,2],[5,2],[-2]",0)); // System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[5,2],[5,2],[-2]",0));
System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[5,2],[5,2],[-2]",1)); // System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[5,2],[5,2],[-2]",1));
System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[0,2],[0,2],[-2]",2)); // System.out.println(substrRule("card-internal-runtime-568fd58554-b2cnk","[0,2],[0,2],[-2]",2));
} }
} }
@@ -644,26 +644,26 @@ public final class StringUtil {
boolean isDBUtf8 = true; boolean isDBUtf8 = true;
String[] chunks = null; String[] chunks = null;
System.out.println("\n test string:" + test); // System.out.println("\n test string:" + test);
System.out.println("utf-8 length = " + getBytesLength(test, true)); // System.out.println("utf-8 length = " + getBytesLength(test, true));
System.out.println("ms949 length = " + getBytesLength(test, false)); // System.out.println("ms949 length = " + getBytesLength(test, false));
System.out.println("\n"); // System.out.println("\n");
for(int len=6; len<9; len++) { for(int len=6; len<9; len++) {
System.out.println(String.format(">> chunk length=%d, isDBUtf8=%b",len, isDBUtf8)); // System.out.println(String.format(">> chunk length=%d, isDBUtf8=%b",len, isDBUtf8));
chunks = chunkStringArray(test,len,isDBUtf8); chunks = chunkStringArray(test,len,isDBUtf8);
System.out.println("chunk = "+ chunkString(test,len,isDBUtf8)); // System.out.println("chunk = "+ chunkString(test,len,isDBUtf8));
System.out.println("chunks[0] = "+ chunks[0]); // System.out.println("chunks[0] = "+ chunks[0]);
System.out.println("chunks[1] = "+ chunks[1]); // System.out.println("chunks[1] = "+ chunks[1]);
} }
System.out.println("\n"); // System.out.println("\n");
isDBUtf8 = false; isDBUtf8 = false;
for(int len=6; len<9; len++) { for(int len=6; len<9; len++) {
System.out.println(String.format(">> chunk length=%d, isDBUtf8=%b",len, isDBUtf8)); // System.out.println(String.format(">> chunk length=%d, isDBUtf8=%b",len, isDBUtf8));
chunks = chunkStringArray(test,len,isDBUtf8); chunks = chunkStringArray(test,len,isDBUtf8);
System.out.println("chunk = "+ chunkString(test,len,isDBUtf8)); // System.out.println("chunk = "+ chunkString(test,len,isDBUtf8));
System.out.println("chunks[0] = "+ chunks[0]); // System.out.println("chunks[0] = "+ chunks[0]);
System.out.println("chunks[1] = "+ chunks[1]); // System.out.println("chunks[1] = "+ chunks[1]);
} }
} }
} }
@@ -229,27 +229,27 @@ public class TypeConversion
short sInit = 730; short sInit = 730;
byte[] bytes = TypeConversion.short2byte(sInit); byte[] bytes = TypeConversion.short2byte(sInit);
short sLL = TypeConversion.parseShort(bytes,0); short sLL = TypeConversion.parseShort(bytes,0);
System.out.println("-----Message Old LL : " + sLL); // System.out.println("-----Message Old LL : " + sLL);
System.out.println("-----Message bytes toString : " + bytes); // System.out.println("-----Message bytes toString : " + bytes);
short sNewLL = 152; short sNewLL = 152;
bytes = TypeConversion.replaceShort(bytes, 0, sNewLL); bytes = TypeConversion.replaceShort(bytes, 0, sNewLL);
sNewLL = TypeConversion.parseShort(bytes,0); sNewLL = TypeConversion.parseShort(bytes,0);
System.out.println("-----Message New LL : " + sNewLL); // System.out.println("-----Message New LL : " + sNewLL);
System.out.println("-----Message bytes toString : " + bytes); // System.out.println("-----Message bytes toString : " + bytes);
String strMsg = "DA F23456789012345678901234567890123456 "; String strMsg = "DA F23456789012345678901234567890123456 ";
short minusOne = -1; short minusOne = -1;
byte[] bytesMsg = strMsg.getBytes(); byte[] bytesMsg = strMsg.getBytes();
bytesMsg = TypeConversion.replaceShort(bytesMsg, 47, minusOne); bytesMsg = TypeConversion.replaceShort(bytesMsg, 47, minusOne);
System.out.println("-----minusOne : [" + new String(bytesMsg)+"]"); // System.out.println("-----minusOne : [" + new String(bytesMsg)+"]");
short rtnMinusOne = TypeConversion.parseShort(bytesMsg, 47); short rtnMinusOne = TypeConversion.parseShort(bytesMsg, 47);
System.out.println("-----minusOne : [" + rtnMinusOne+"]"); // System.out.println("-----minusOne : [" + rtnMinusOne+"]");
bytesMsg = TypeConversion.replaceShort(bytesMsg, 0, sNewLL); bytesMsg = TypeConversion.replaceShort(bytesMsg, 0, sNewLL);
System.out.println("-----minusOne : [" + new String(bytesMsg)+"]"); // System.out.println("-----minusOne : [" + new String(bytesMsg)+"]");
} }
@@ -129,8 +129,8 @@ public final class UUIDGenerator {
// System.out.println(getGUID("user000001")); // System.out.println(getGUID("user000001"));
// System.out.println(new Integer("01")); // System.out.println(new Integer("01"));
seq = 99999999; seq = 99999999;
System.out.println(getGUID("MCI")); // System.out.println(getGUID("MCI"));
System.out.println(getGUID("MCI")); // System.out.println(getGUID("MCI"));
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
for (int i = 0; i < 100000000; i++) { for (int i = 0; i < 100000000; i++) {
char[] seq = String.valueOf(i).toCharArray(); char[] seq = String.valueOf(i).toCharArray();
@@ -139,14 +139,14 @@ public final class UUIDGenerator {
System.arraycopy(seq, 0, formatSeq, destPos, seq.length); System.arraycopy(seq, 0, formatSeq, destPos, seq.length);
} }
long end = System.currentTimeMillis() - start; long end = System.currentTimeMillis() - start;
System.out.println("c1 time-" + end); // System.out.println("c1 time-" + end);
start = System.currentTimeMillis(); start = System.currentTimeMillis();
for (int i = 0; i < 100000000; i++) { for (int i = 0; i < 100000000; i++) {
String formatSeq = StringUtils.leftPad(String.valueOf(i), 10, '0'); String formatSeq = StringUtils.leftPad(String.valueOf(i), 10, '0');
} }
end = System.currentTimeMillis() - start; end = System.currentTimeMillis() - start;
System.out.println("c2 time-" + end); // System.out.println("c2 time-" + end);
// System.out.println(formatSeq); // System.out.println(formatSeq);
} }
@@ -110,7 +110,7 @@ public class AESCipher
} }
catch (Exception e) catch (Exception e)
{ {
System.out.println(e.toString()); // System.out.println(e.toString());
} }
return resultData; return resultData;
@@ -60,7 +60,7 @@ public class ECDHESA256Cipher {
} }
this.pubKey = cert.getPublicKey(); this.pubKey = cert.getPublicKey();
System.out.println(pubKey.getAlgorithm()); // "RSA" 또는 "EC" // System.out.println(pubKey.getAlgorithm()); // "RSA" 또는 "EC"
if ("RSA".equals(pubKey.getAlgorithm())) { if ("RSA".equals(pubKey.getAlgorithm())) {
RSAPublicKey rsaPub = (RSAPublicKey) cert.getPublicKey(); RSAPublicKey rsaPub = (RSAPublicKey) cert.getPublicKey();
@@ -102,7 +102,7 @@ public class ECDHESA256Cipher {
for (Certificate c : certs) { for (Certificate c : certs) {
if (c instanceof X509Certificate) { if (c instanceof X509Certificate) {
cert = (X509Certificate) c; cert = (X509Certificate) c;
System.out.println("Subject: " + cert.getSubjectDN()); // System.out.println("Subject: " + cert.getSubjectDN());
} }
} }
@@ -112,7 +112,7 @@ public class ECDHESA256Cipher {
// 공개키 저장 알고리즘 확인 // 공개키 저장 알고리즘 확인
this.pubKey = cert.getPublicKey(); this.pubKey = cert.getPublicKey();
System.out.println(pubKey.getAlgorithm()); // "RSA" 또는 "EC" // System.out.println(pubKey.getAlgorithm()); // "RSA" 또는 "EC"
KeyStore ks = KeyStore.getInstance("PKCS12"); KeyStore ks = KeyStore.getInstance("PKCS12");
@@ -120,7 +120,7 @@ public class ECDHESA256Cipher {
//PrivateKey myPrivateKey = (PrivateKey) ks.getKey(keyAlias, keyPass.toCharArray()); //PrivateKey myPrivateKey = (PrivateKey) ks.getKey(keyAlias, keyPass.toCharArray());
//PrivateKey myPrivateKey = (PrivateKey) ks.getKey("mykey", "key1234".toCharArray()); //PrivateKey myPrivateKey = (PrivateKey) ks.getKey("mykey", "key1234".toCharArray());
PrivateKey myPrivateKey = NPKILoader.loadPrivateKey(priPath, password, pubKey.getAlgorithm()); PrivateKey myPrivateKey = NPKILoader.loadPrivateKey(priPath, password, pubKey.getAlgorithm());
System.out.println("PrivateKey Alg: " + myPrivateKey.getAlgorithm()); // System.out.println("PrivateKey Alg: " + myPrivateKey.getAlgorithm());
RSAPublicKey publicKey = (RSAPublicKey) cert.getPublicKey(); RSAPublicKey publicKey = (RSAPublicKey) cert.getPublicKey();
this.receiverPublicRSAKey = new RSAKey.Builder(publicKey) this.receiverPublicRSAKey = new RSAKey.Builder(publicKey)