Skip to content

Commit 0bdbce9

Browse files
author
root
committed
source code format
1 parent 48dd26e commit 0bdbce9

File tree

11 files changed

+32
-111
lines changed

11 files changed

+32
-111
lines changed

jp/jbxl/Base64.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package jp.jbxl;
22

33

4-
54
/**
65
* Base64 の符号化,復号化を行なう.
76
*
@@ -14,7 +13,6 @@ public class Base64
1413
private static String ascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1514
// 0123456789012345678901234567890123456789012345678901234567890123
1615

17-
1816
/**
1917
* コンストラクタは使用しない
2018
* @deprecated
@@ -23,8 +21,7 @@ private Base64()
2321
{
2422
}
2523

26-
27-
24+
2825
/**
2926
* バイトデータ dec を Base64の Stringに変換する.
3027
* @param dec Base64 に変換するバイト列
@@ -61,7 +58,6 @@ public static String encode(byte[] dec)
6158
}
6259

6360

64-
6561
/**
6662
* Base64でエンコードされた String buf をバイト列に戻す.
6763
* @param buf 復号化する Base64 文字列

jp/jbxl/DHCrypt.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515
public class DHCrypt
1616
{
17-
1817
private KeyPairGenerator myKeyPairGen;
1918
private KeyFactory myKeyFac;
2019
private KeyPair myKeyPair;
@@ -51,7 +50,6 @@ public DHCrypt()
5150
}
5251

5352

54-
5553
/**
5654
* サーバの SPKI(DER形式)から自分の SPKI(DER形式)を生成して返す.また,共通鍵 mySharedSecret も計算する.
5755
*
@@ -92,7 +90,6 @@ public byte[] dhClient(byte[] serverKeyEnc)
9290
return myPubKey;
9391
}
9492

95-
9693

9794
/**
9895
* DES(ECB) での暗号化.テスト用.<br>
@@ -123,4 +120,3 @@ public byte[] dhCrypt(byte[] data)
123120

124121
}
125122

126-

jp/jbxl/INet_TCP.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
import java.io.*;
1010

1111

12-
1312
/**
1413
* INet Protocol を処理するためのTCPサブクラス
1514
* @author Fumi.Iseki
1615
*/
17-
1816
public class INet_TCP extends TCP_Socket
1917
{
2018
/**
@@ -39,7 +37,6 @@ public INet_TCP()
3937
}
4038

4139

42-
4340
/**
4441
* コンストラクタ.サーバへの connectも行う.
4542
* @param server_host サーバ名
@@ -52,7 +49,6 @@ public INet_TCP(String server_host, int port)
5249
}
5350

5451

55-
5652
/**
5753
* サーバポートへのコネクトを行う.
5854
* @param server_host サーバ名
@@ -72,7 +68,6 @@ public void connect(String server_host, int port) throws Exception
7268
}
7369

7470

75-
7671
/**
7772
* サーバから "OK" の返答を待つ.
7873
* @return 0:正常終了(OKの返答あり). その他:サーバからのエラーNo.
@@ -102,7 +97,6 @@ public int recvOK() throws Exception
10297
}
10398

10499

105-
106100
/**
107101
* サーバにコマンドを送って,"OK" の返答を待つ.
108102
* @param command サーバへ送るコマンド.
@@ -125,7 +119,6 @@ public int sendCommandRecvOK(String command) throws Exception
125119
}
126120

127121

128-
129122
/**
130123
* サーバからの "OK"の後のメッセージ("END"まで)を受けとる.
131124
* @param mesg サーバへ送るコマンド
@@ -155,7 +148,6 @@ public int recvMesgUntilEND(String[] mesg) throws Exception
155148
return ret_no;
156149
}
157150

158-
159151

160152
/**
161153
* ソケットをクローズする
@@ -169,7 +161,6 @@ public void close()
169161
}
170162

171163

172-
173164
/**
174165
* 複数のファイルをサーバへ転送し,サーバからの返答を待つ<br>
175166
* 転送状況を示すプログレスバーは使用しない
@@ -183,7 +174,6 @@ public int sendFileRecvOK(File[] files) throws Exception
183174
return sendFileRecvOK(files, false);
184175
}
185176

186-
187177

188178
/**
189179
* 複数のファイルをサーバへ転送し,サーバからの返答を待つ<br>
@@ -224,7 +214,6 @@ public int sendFileRecvOK(File[] files, boolean t) throws Exception
224214
}
225215

226216

227-
228217
/**
229218
* ファイルを1つサーバへ転送し,サーバからの返答を待つ
230219
* 転送状況を示すプログレスバーは使用しない
@@ -239,7 +228,6 @@ public int sendFileRecvOK(File file) throws Exception
239228
}
240229

241230

242-
243231
/**
244232
* ファイルを1つサーバへ転送し,サーバからの返答を待つ
245233
* 転送状況を示すプログレスバーを使用を使用するかどうか指定可能
@@ -281,7 +269,6 @@ public int sendFileRecvOK(File file, ProgBarDialog pbd) throws Exception
281269
}
282270

283271

284-
285272
/**
286273
* ファイルを1つサーバへ転送する.
287274
* 転送状況を示すプログレスバーは使用しない.
@@ -295,7 +282,6 @@ public int sendFile(File file) throws Exception
295282
return this.sendFile(file, (ProgBarDialog)null);
296283
}
297284

298-
299285

300286
/**
301287
* ファイルを1つサーバへ転送する.
@@ -356,7 +342,6 @@ public int sendFile(File file, ProgBarDialog pbd) throws Exception
356342
cnt = false;
357343
}
358344
}
359-
360345

361346
try {
362347
iFile.close();

jp/jbxl/ProgBarDialog.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import javax.swing.JDialog;
1313
import javax.swing.JProgressBar;
1414
import javax.swing.JTextArea;
15-
1615

1716

1817
/**
@@ -48,7 +47,7 @@ public class ProgBarDialog extends JDialog
4847
*/
4948
public JTextArea mesgText = null;
5049

51-
50+
5251
/**
5352
* デフォルトコンストラクタ
5453
*/
@@ -59,7 +58,6 @@ public ProgBarDialog()
5958
}
6059

6160

62-
6361
/**
6462
* コンストラクタ.
6563
* @param frame 呼び出した(親)フレームを指定.(通常は this を指定)
@@ -81,7 +79,6 @@ public ProgBarDialog(Frame frame, String title, int min, int max)
8179
}
8280
}
8381

84-
8582

8683
/**
8784
* コンストラクタ.
@@ -94,7 +91,6 @@ public ProgBarDialog(String title, int min, int max)
9491
this(null, title, min, max);
9592
}
9693

97-
9894

9995
/**
10096
* コンストラクタ.バーの目盛の最小値は 0となる.
@@ -105,7 +101,6 @@ public ProgBarDialog(String title, int max)
105101
{
106102
this(null, title, 0, max);
107103
}
108-
109104

110105

111106
/**
@@ -118,7 +113,6 @@ public void showup_Center()
118113
this.setLocation((ScrnSize.width-dlogSize.width)/2, (ScrnSize.height-dlogSize.height)/2);
119114
this.setVisible(true);
120115
}
121-
122116

123117

124118
private void initialize()
@@ -131,7 +125,6 @@ private void initialize()
131125
}
132126

133127

134-
135128
private javax.swing.JPanel getJContentPane()
136129
{
137130
if(jContentPane == null) {
@@ -143,7 +136,6 @@ private javax.swing.JPanel getJContentPane()
143136
return jContentPane;
144137
}
145138

146-
147139

148140
private JProgressBar getPrgBar()
149141
{
@@ -156,7 +148,6 @@ private JProgressBar getPrgBar()
156148
return prgBar;
157149
}
158150

159-
160151

161152
private JTextArea getMesg_Text()
162153
{
@@ -168,5 +159,4 @@ private JTextArea getMesg_Text()
168159
return mesgText;
169160
}
170161

171-
172162
} // @jve:decl-index=0:visual-constraint="10,10"

jp/jbxl/TCP_Server.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package jp.jbxl;
22

3-
43
import java.net.*;
54

65

@@ -9,7 +8,6 @@
98
* @author Fumi.Iseki
109
* @version 1.0
1110
*/
12-
1311
public class TCP_Server
1412
{
1513
private ServerSocket serverSock = null; // サーバーソケット
@@ -21,7 +19,6 @@ public class TCP_Server
2119

2220
public int connectMax = 50;
2321

24-
2522

2623
/**
2724
* コンストラクタ.初期化のみ行なう.<br>
@@ -31,7 +28,6 @@ public TCP_Server()
3128
{
3229
init();
3330
}
34-
3531

3632

3733
/**
@@ -54,7 +50,6 @@ public TCP_Server(int port)
5450
}
5551
}
5652

57-
5853

5954
/**
6055
* オブジェクトを生成し,TCPサーバソケットを作成する. <br>
@@ -78,7 +73,6 @@ public TCP_Server(int port, int cmax)
7873
}
7974

8075

81-
8276
/**
8377
* すでにあるオブジェクトに対して,新しいTCPサーバソケットを作成(オープン)する<br>
8478
* ポート番号portにソケットを作成する.同時最大接続数は50.<br>
@@ -103,7 +97,6 @@ public void open(int port) throws Exception
10397
}
10498
}
10599

106-
107100

108101
/**
109102
* すでにあるオブジェクトに対して,新しいTCPサーバソケットを作成(オープン)する<br>
@@ -129,7 +122,6 @@ public void open(int port, int cmax) throws Exception
129122
throw new Exception("TCP_Server.open: Open Server Socket Faled.");
130123
}
131124
}
132-
133125

134126

135127
/**
@@ -154,7 +146,6 @@ public TCP_Socket accept() throws Exception
154146
}
155147
return tcp;
156148
}
157-
158149

159150

160151
/**
@@ -168,7 +159,6 @@ public void init()
168159
}
169160

170161

171-
172162
/**
173163
* TCP_Serverソケットのクローズ
174164
*
@@ -186,7 +176,6 @@ public void close()
186176
errFlag = true;
187177
}
188178
}
189-
190179

191180

192181
protected void finalize()

0 commit comments

Comments
 (0)