1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170 package com.buckosoft.fibs.BuckoFIBS;
171
172 import java.io.File;
173 import java.io.FileInputStream;
174 import java.io.FileOutputStream;
175 import java.util.Properties;
176 import java.util.Timer;
177 import java.util.TimerTask;
178
179 import com.buckosoft.fibs.domain.config.RatingGraphConfig;
180 import com.buckosoft.fibs.net.FIBSAttributes;
181
182
183
184
185
186
187
188
189 public class BFProperties extends Properties implements FIBSAttributes {
190 private final static boolean DEBUG = false;
191
192 private static final long serialVersionUID = 1L;
193 final static String propFile = "BuckoFIBS.cfg";
194
195 public final static int RIGHT_DIE_PLAYS = 0;
196 public final static int RIGHT_DIE_SWAPS = 1;
197
198 final static String s_selectedProfile = "selectedProfile";
199 final static String s_profileName = "profileName";
200 final static String s_userName = "userName";
201 final static String s_password = "password";
202 final static String s_serverName = "serverName";
203 final static String s_serverPort = "serverPort";
204
205 final static String s_mHeight = "mainHeight";
206 final static String s_mWidth = "mainWidth";
207 final static String s_mX = "mainX";
208 final static String s_mY = "mainY";
209 final static String s_mTopBottomSplit = "mainTBSplit";
210 final static String s_mTopLRSplit = "mainTLRSplit";
211 final static String s_mBotLRSplit = "mainBLRSplit";
212 final static String s_showPointNumbers = "showPointNumbers";
213 final static String s_autoConnect = "autoConnect";
214 final static String s_dispXmit = "displayXmit";
215 final static String s_dispRecv = "displayRecv";
216 final static String s_allowMultiPerson = "multiplePerson";
217 final static String s_hoverHelpers = "hoverHelpers";
218 final static String s_audioCues = "audioCues";
219 final static String s_ratingGraphType = "ratingGraphType";
220 final static String s_ratingGraphAmt = "ratingGraphAmt";
221
222 final static String s_msgIgnoreShouts = "msgIgnoreShouts";
223 final static String s_msgShowGameMoves = "msgShowGameMoves";
224 final static String s_msgOtherMatchInfo = "msgOtherMatchInfo";
225 final static String s_msgLoginsAndOuts = "msgLoginsAndOuts";
226 final static String s_fibsReadyToPlay = "fibsReadyToPlay";
227 final static String s_rop = "rop";
228 final static String s_autoGreedyBearOff = "autoGreedyBearOff";
229 final static String s_animateMoves = "animateMoves";
230 final static String s_animateType = "animateType";
231 final static String s_animateSpeed = "animateSpeed";
232 final static String s_changeTabOnNewMsg = "changeTabOnMessage";
233 final static String s_dontChangeTabOnShout = "dontChangeTabOnShout";
234
235 final static String s_rightDieType = "rightDieType";
236 final static String s_highDieLeft = "highDieLeft";
237
238 final static String s_DEBUG_NotReady = "NotReady";
239 final static String s_DEBUG_ShowUnhandledCookies = "ShowUnhandledCookies";
240 final static String s_DEBUG_StdoutNetworkMessages = "stdoutNetMessages";
241 final static String s_DEBUG_ShowAnimatePath = "showAnimatePath";
242
243
244
245 private boolean newbie = false;
246
247 private RatingGraphConfig ratingGraphConfig = new RatingGraphConfig();
248
249 private class BFProp {
250 String key;
251 String value;
252 BFProp(String key, String value) {
253
254 this.key = key;
255 this.value = value;
256 }
257 }
258 private BFProp[] bfProps = {
259 new BFProp(s_selectedProfile, "0"),
260 new BFProp(s_serverName + 0, "fibs.com"),
261
262 new BFProp(s_serverPort + 0, "4321"),
263 new BFProp(s_userName + 0, ""),
264 new BFProp(s_password + 0, ""),
265 new BFProp(s_mWidth, "1000"),
266 new BFProp(s_mHeight, "846"),
267 new BFProp(s_mX, "10"),
268 new BFProp(s_mY, "10"),
269 new BFProp(s_mTopBottomSplit, "482"),
270 new BFProp(s_mTopLRSplit, "532"),
271 new BFProp(s_mBotLRSplit, "123"),
272 new BFProp(s_autoConnect, "0"),
273 new BFProp(s_autoGreedyBearOff, "1"),
274 new BFProp(s_rightDieType, "" + RIGHT_DIE_PLAYS),
275 new BFProp(s_highDieLeft, "1"),
276 new BFProp(s_showPointNumbers, "1"),
277 new BFProp(s_dispXmit, "0"),
278 new BFProp(s_dispRecv, "0"),
279 new BFProp(s_allowMultiPerson, "0"),
280 new BFProp(s_hoverHelpers, "1"),
281 new BFProp(s_audioCues, "1"),
282 new BFProp(s_rop, "111"),
283 new BFProp(s_ratingGraphType, "0"),
284 new BFProp(s_ratingGraphAmt, "50"),
285 new BFProp(s_msgIgnoreShouts, "0"),
286 new BFProp(s_msgShowGameMoves, "1"),
287 new BFProp(s_msgOtherMatchInfo, "1"),
288 new BFProp(s_msgLoginsAndOuts, "1"),
289 new BFProp(s_fibsReadyToPlay, "1"),
290 new BFProp(s_animateMoves, "1"),
291 new BFProp(s_animateType, "1"),
292 new BFProp(s_animateSpeed, "2.0"),
293 new BFProp(s_changeTabOnNewMsg, "1"),
294 new BFProp(s_dontChangeTabOnShout, "1"),
295 new BFProp(s_DEBUG_NotReady, "0"),
296 new BFProp(s_DEBUG_ShowUnhandledCookies, "0"),
297 new BFProp(s_DEBUG_StdoutNetworkMessages, "0"),
298 new BFProp(s_DEBUG_ShowAnimatePath, "0"),
299 };
300
301
302
303
304 public BFProperties(boolean TEST) {
305 _BFProperties(null);
306
307 }
308
309
310
311 public BFProperties() {
312 _BFProperties(System.getProperty("user.home")
313 + File.separator + "BuckoFIBS" + File.separator + propFile);
314 }
315
316 private void _BFProperties(String filename) {
317 try {
318 FileInputStream fip = new FileInputStream(filename);
319 load(fip);
320 }
321 catch (Exception e) {
322 System.out.println("Exception while loading props:" + e);
323 newbie = true;
324 }
325
326 for (BFProp bfProp : bfProps) {
327 if (getProperty(bfProp.key) == null)
328 setProperty(bfProp.key, bfProp.value);
329 }
330 }
331
332 private Timer myTimer = null;
333 private TimerTask myTimerTask = new MyTimerTask(this);
334 private void propsChanged() {
335 if (myTimer != null) {
336 return;
337 }
338 myTimer = new Timer();
339 try {
340 myTimerTask = new MyTimerTask(this);
341 myTimer.schedule(myTimerTask, 1000);
342 } catch (IllegalStateException e) {
343 e.printStackTrace();
344 }
345 }
346
347 private class MyTimerTask extends TimerTask {
348 private BFProperties props;
349
350 MyTimerTask(BFProperties props) {
351 super();
352 this.props = props;
353 }
354
355
356
357 @Override
358 public void run() {
359 this.props.save();
360 this.props.myTimer.cancel();
361 this.props.myTimer = null;
362 }
363 }
364
365
366
367
368 @Override
369 public String getAppSignature() {
370 return("BuckoFIBS-" + Version.getVersion());
371 }
372
373
374
375
376 public boolean isNewbie() {
377 return newbie;
378 }
379
380
381
382
383 public int getSelectedProfile() {
384 return(Integer.parseInt(getProperty(s_selectedProfile)));
385 }
386
387
388
389
390 public void setSelectedProfile(int profileId) {
391 if (getSelectedProfile() != profileId)
392 propsChanged();
393 setProperty(s_selectedProfile, "" + profileId);
394 }
395
396
397
398
399 public int getProfileCount() {
400 int profileCount = 0;
401 while (true) {
402 if (getProperty(s_profileName + profileCount) == null)
403 return(profileCount);
404 profileCount++;
405 }
406 }
407
408
409
410
411
412 public String getProfileName(int profileId) {
413 return(getProperty(s_profileName + profileId));
414 }
415
416
417
418
419
420 public void setProfileName(int profileId, String s) {
421 if (!s.equals(getProfileName(profileId)))
422 propsChanged();
423 setProperty(s_profileName + profileId, s);
424 }
425
426
427
428
429 public String getUserName() {
430 return(this.getUserName(this.getSelectedProfile()));
431 }
432
433
434
435
436
437 public String getUserName(int profileId) {
438 String s = getProperty(s_userName + profileId);
439 if (s == null)
440 s = "";
441 return(s);
442 }
443
444
445
446
447
448 public void setUserName(int profileId, String s) {
449 if (!s.equals(getUserName(profileId)))
450 propsChanged();
451 setProperty(s_userName + profileId, s);
452 }
453
454
455
456
457 public String getUserPassword() {
458 return(this.getPassword(this.getSelectedProfile()));
459 }
460
461
462
463
464
465 public String getPassword(int profileId) {
466 String t = getProperty(s_password + profileId);
467 if (t == null)
468 return("");
469 t = ROT13.doConvert(t);
470
471 if (DEBUG)
472 System.out.println("get password = " + t);
473 return(t);
474 }
475
476
477
478
479
480 public void setPassword(int profileId, String s) {
481 if (!s.equals(getPassword(profileId)))
482 propsChanged();
483 String t = ROT13.doConvert(s);
484 setProperty(s_password + profileId, t);
485 if (DEBUG)
486 System.out.println("set password = " + getProperty(s_password));
487 }
488
489
490
491
492 public String getServerName() {
493 return(this.getServerName(this.getSelectedProfile()));
494 }
495
496
497
498
499 public String getServerName(int profileId) {
500 String s = getProperty(s_serverName + profileId);
501 if (s == null)
502 s = "fibs.com";
503 return(s);
504 }
505
506
507
508
509
510 public void setServerName(int profileId, String s) {
511 if (!s.equals(getServerName(profileId)))
512 propsChanged();
513 setProperty(s_serverName + profileId, s);
514 }
515
516
517
518
519 public int getServerPort() {
520 return(this.getServerPort(this.getSelectedProfile()));
521 }
522
523
524
525
526
527 public int getServerPort(int profileId) {
528 String s = getProperty(s_serverPort + profileId);
529 if (s == null)
530 return(4321);
531 return(Integer.parseInt(s));
532 }
533
534
535
536
537
538 public void setServerPort(int profileId, int port) {
539 if (port != getServerPort(profileId))
540 propsChanged();
541 setProperty(s_serverPort + profileId, new Integer(port).toString());
542 }
543
544
545
546
547 public int getMainWidth() {
548 String s = getProperty(s_mWidth);
549 return(Integer.parseInt(s));
550 }
551
552
553
554
555 public void setMainWidth(int width) {
556 if (width != getMainWidth())
557 propsChanged();
558 setProperty(s_mWidth, new Integer(width).toString());
559 }
560
561 public int getRightDieType() {
562 String s = getProperty(s_rightDieType);
563 return(Integer.parseInt(s));
564 }
565
566 public void setRightDieType(int rightDieType) {
567 if (rightDieType != getRightDieType())
568 propsChanged();
569 setProperty(s_rightDieType, "" + rightDieType);
570 }
571
572 public boolean isHighDieLeft() {
573 String s = getProperty(s_highDieLeft);
574 return(Integer.parseInt(s) == 1 ? true : false);
575 }
576
577 public void setHighDieLeft(boolean highDieLeft) {
578 if (highDieLeft != isHighDieLeft())
579 propsChanged();
580 setProperty(s_highDieLeft, highDieLeft ? "1" : "0");
581 }
582
583
584
585
586 public int getMainHeight() {
587 String s = getProperty(s_mHeight);
588 return(Integer.parseInt(s));
589 }
590
591
592
593
594 public void setMainHeight(int height) {
595 if (height != getMainHeight())
596 propsChanged();
597 setProperty(s_mHeight, new Integer(height).toString());
598 }
599
600
601
602
603
604 public int getMainX() {
605 String s = getProperty(s_mX);
606 return(Integer.parseInt(s));
607 }
608
609
610
611
612 public void setMainX(int x) {
613 if (x != getMainX())
614 propsChanged();
615 setProperty(s_mX, new Integer(x).toString());
616 }
617
618
619
620
621
622 public int getMainY() {
623 String s = getProperty(s_mY);
624 return(Integer.parseInt(s));
625 }
626
627
628
629
630 public void setMainY(int y) {
631 if (y != getMainY())
632 propsChanged();
633 setProperty(s_mY, new Integer(y).toString());
634 }
635
636
637
638
639 public int getMainTopBottomSplit() {
640 String s = getProperty(s_mTopBottomSplit);
641 return(Integer.parseInt(s));
642 }
643
644
645
646
647 public void setMainTopBottomSplit(int sp) {
648 if (sp != getMainTopBottomSplit())
649 propsChanged();
650 setProperty(s_mTopBottomSplit, new Integer(sp).toString());
651 }
652
653
654
655
656 public int getMainTopLRSplit() {
657 String s = getProperty(s_mTopLRSplit);
658 return(Integer.parseInt(s));
659 }
660
661
662
663
664 public void setMainTopLRSplit(int sp) {
665 if (sp != getMainTopLRSplit())
666 propsChanged();
667 setProperty(s_mTopLRSplit, new Integer(sp).toString());
668 }
669
670
671
672
673 public int getMainBotLRSplit() {
674 String s = getProperty(s_mBotLRSplit);
675 return(Integer.parseInt(s));
676 }
677
678
679
680
681 public void setMainBotLRSplit(int sp) {
682 if (sp != getMainBotLRSplit())
683 propsChanged();
684 setProperty(s_mBotLRSplit, new Integer(sp).toString());
685 }
686
687
688
689
690 public boolean isShowPointNumbers() {
691 String s = getProperty(s_showPointNumbers);
692 return(s.equals("1"));
693 }
694
695
696
697
698 public void setShowPointNumbers(boolean b) {
699 if (b != isShowPointNumbers())
700 propsChanged();
701 setProperty(s_showPointNumbers, b ? "1" : "0");
702 }
703
704
705
706
707 public boolean isAutoConnect() {
708 String s = getProperty(s_autoConnect);
709 return(s.equals("1"));
710 }
711
712
713
714
715 public void setAutoConnect(boolean b) {
716 if (b != isAutoConnect())
717 propsChanged();
718 setProperty(s_autoConnect, b ? "1" : "0");
719 }
720
721
722
723
724 public boolean isAutoGreedyBearOff() {
725 String s = getProperty(s_autoGreedyBearOff);
726 return(s.equals("1"));
727 }
728
729
730
731
732 public void setAutoGreedyBearOff(boolean b) {
733 if (b != isAutoGreedyBearOff())
734 propsChanged();
735 setProperty(s_autoGreedyBearOff, b ? "1" : "0");
736 }
737
738
739
740
741 public boolean isDisplayXmit() {
742 String s = getProperty(s_dispXmit);
743 return(s.equals("1"));
744 }
745
746
747
748
749 public void setDisplayXmit(boolean b) {
750 if (b != isDisplayXmit())
751 propsChanged();
752 setProperty(s_dispXmit, b ? "1" : "0");
753 }
754
755
756
757
758 public boolean isAnimateMoves() {
759 String s = getProperty(s_animateMoves);
760 return(s.equals("1"));
761 }
762
763
764
765
766 public void setAnimateMoves(boolean b) {
767 if (b != isAnimateMoves())
768 propsChanged();
769 setProperty(s_animateMoves, b ? "1" : "0");
770 }
771
772 public int getAnimateType() {
773 String s = getProperty(s_animateType);
774 return(Integer.parseInt(s));
775 }
776
777 public void setAnimateType(int type) {
778 if (type != getAnimateType())
779 propsChanged();
780 setProperty(s_animateType, new Integer(type).toString());
781 }
782
783 public double getAnimateSpeed() {
784 String s = getProperty(s_animateSpeed);
785 return(Double.parseDouble(s));
786 }
787
788 public void setAnimateSpeed(double speed) {
789 if (speed != getAnimateSpeed())
790 propsChanged();
791 setProperty(s_animateSpeed, new Double(speed).toString());
792 }
793
794
795
796
797
798 public boolean isDisplayRecv() {
799 String s = getProperty(s_dispRecv);
800 return(s.equals("1"));
801 }
802
803
804
805
806 public void setDisplayRecv(boolean b) {
807 if (b != isDisplayRecv())
808 propsChanged();
809 setProperty(s_dispRecv, b ? "1" : "0");
810 }
811
812
813
814
815 public boolean isStdoutNetworkMessages() {
816 String s = getProperty(s_DEBUG_StdoutNetworkMessages);
817 return(s.equals("1"));
818 }
819
820
821
822
823 public void setStdoutNetworkMessages(boolean b) {
824 if (b != isStdoutNetworkMessages())
825 propsChanged();
826 setProperty(s_DEBUG_StdoutNetworkMessages, b ? "1" : "0");
827 }
828
829
830
831
832
833
834 public boolean isAllowMultiplePersonalities() {
835 String s = getProperty(s_allowMultiPerson);
836 return(s.equals("1"));
837 }
838
839
840
841
842 public void setAllowMultiplePersonalities(boolean b) {
843 if (b != isAllowMultiplePersonalities())
844 propsChanged();
845 setProperty(s_allowMultiPerson, b ? "1" : "0");
846 }
847
848
849
850
851
852 public boolean isHoverHelpers() {
853 String s = getProperty(s_hoverHelpers);
854 return(s.equals("1"));
855 }
856
857
858
859
860 public void setHoverHelpers(boolean b) {
861 if (b != isHoverHelpers())
862 propsChanged();
863 setProperty(s_hoverHelpers, b ? "1" : "0");
864 }
865
866
867
868
869 public boolean isAudioCues() {
870 String s = getProperty(s_audioCues);
871 return(s.equals("1"));
872 }
873
874
875
876
877 public void setAudioCues(boolean b) {
878 if (b != isAudioCues())
879 propsChanged();
880 setProperty(s_audioCues, b ? "1" : "0");
881 }
882
883
884
885
886 public boolean isMsgIgnoreShouts() {
887 String s = getProperty(s_msgIgnoreShouts);
888 return(s.equals("1"));
889 }
890
891
892
893
894 public void setMsgIgnoreShouts(boolean b) {
895 if (b != isMsgIgnoreShouts())
896 propsChanged();
897 setProperty(s_msgIgnoreShouts, b ? "1" : "0");
898 }
899
900
901
902
903 public boolean isMsgShowGameMoves() {
904 String s = getProperty(s_msgShowGameMoves);
905 return(s.equals("1"));
906 }
907
908
909
910
911 public void setMsgShowGameMoves(boolean b) {
912 if (b != isMsgShowGameMoves())
913 propsChanged();
914 setProperty(s_msgShowGameMoves, b ? "1" : "0");
915 }
916
917
918
919
920 public boolean isMsgOtherMatchInfo() {
921 String s = getProperty(s_msgOtherMatchInfo);
922 return(s.equals("1"));
923 }
924
925
926
927
928 public void setMsgOtherMatchInfo(boolean b) {
929 if (b != isMsgOtherMatchInfo())
930 propsChanged();
931 setProperty(s_msgOtherMatchInfo, b ? "1" : "0");
932 }
933
934
935
936
937 public boolean isChangeTabOnNewMsg() {
938 String s = getProperty(s_changeTabOnNewMsg);
939 return(s.equals("1"));
940 }
941
942
943
944
945 public void setChangeTabOnNewMsg(boolean b) {
946 if (b != isChangeTabOnNewMsg())
947 propsChanged();
948 setProperty(s_changeTabOnNewMsg, b ? "1" : "0");
949 }
950
951
952
953
954 public boolean isDontChangeTabOnShout() {
955 String s = getProperty(s_dontChangeTabOnShout);
956 return(s.equals("1"));
957 }
958
959
960
961
962 public void setDontChangeTabOnShout(boolean b) {
963 if (b != isDontChangeTabOnShout())
964 propsChanged();
965 setProperty(s_dontChangeTabOnShout, b ? "1" : "0");
966 }
967
968
969
970
971 public boolean isMsgLoginsAndOuts() {
972 String s = getProperty(s_msgLoginsAndOuts);
973 return(s.equals("1"));
974 }
975
976
977
978
979 public void setMsgLoginsAndOuts(boolean b) {
980 if (b != isMsgLoginsAndOuts())
981 propsChanged();
982 setProperty(s_msgLoginsAndOuts, b ? "1" : "0");
983 }
984
985
986
987
988 public boolean isFibsReadyToPlay() {
989 String s = getProperty(s_fibsReadyToPlay);
990 return(s.equals("1"));
991 }
992
993
994
995
996 public void setFibsReadyToPlay(boolean b) {
997 if (b != isFibsReadyToPlay())
998 propsChanged();
999 setProperty(s_fibsReadyToPlay, b ? "1" : "0");
1000 }
1001
1002
1003
1004
1005 public void setROP(boolean[] rop) {
1006 if (rop != getROP())
1007 propsChanged();
1008 String s = (rop[0] ? "1" : "0")
1009 + (rop[1] ? "1" : "0")
1010 + (rop[2] ? "1" : "0");
1011 setProperty(s_rop, s);
1012
1013 }
1014
1015
1016
1017
1018 public boolean[] getROP() {
1019 boolean[] b = new boolean[3];
1020 String s = getProperty(s_rop);
1021 b[0] = s.charAt(0) == '1' ? true : false;
1022 b[1] = s.charAt(1) == '1' ? true : false;
1023 b[2] = s.charAt(2) == '1' ? true : false;
1024 return(b);
1025 }
1026
1027 public RatingGraphConfig getRatingGraphConfig() {
1028 String s = getProperty(s_ratingGraphType);
1029 ratingGraphConfig.setTypeAsInt(Integer.parseInt(s));
1030 s = getProperty(s_ratingGraphAmt);
1031 ratingGraphConfig.setMatchCount(Integer.parseInt(s));
1032 return(ratingGraphConfig);
1033 }
1034
1035 public void setRatingGraphConfig(RatingGraphConfig ratingGraphConfig) {
1036 this.ratingGraphConfig = ratingGraphConfig;
1037 setProperty(s_ratingGraphType, "" + this.ratingGraphConfig.getTypeAsInt());
1038 setProperty(s_ratingGraphAmt, "" + this.ratingGraphConfig.getMatchCount());
1039 propsChanged();
1040 }
1041
1042
1043
1044
1045 public boolean isDEBUG_ShowUnhandledCookies() {
1046 String s = getProperty(s_DEBUG_ShowUnhandledCookies);
1047 return(s.equals("1"));
1048 }
1049
1050
1051
1052
1053 public void setDEBUG_ShowUnhandledCookies(boolean b) {
1054 if (b != isDEBUG_ShowUnhandledCookies())
1055 propsChanged();
1056 setProperty(s_DEBUG_ShowUnhandledCookies, b ? "1" : "0");
1057 }
1058
1059
1060
1061
1062 public boolean isDEBUG_ShowAnimatePath() {
1063 String s = getProperty(s_DEBUG_ShowAnimatePath);
1064 return(s.equals("1"));
1065 }
1066
1067
1068
1069
1070 public void setDEBUG_ShowAnimatePath(boolean b) {
1071 if (b != isDEBUG_ShowAnimatePath())
1072 propsChanged();
1073 setProperty(s_DEBUG_ShowAnimatePath, b ? "1" : "0");
1074 }
1075
1076
1077 static class ROT13 {
1078
1079 static private int abyte = 0;
1080
1081 public static String doConvert(String in) {
1082
1083 StringBuffer tempReturn = new StringBuffer();
1084
1085
1086 for (int i=0; i<in.length(); i++) {
1087
1088 abyte = in.charAt(i);
1089 int cap = abyte & 32;
1090 abyte &= ~cap;
1091 abyte = ( (abyte >= 'A') && (abyte <= 'Z') ? ((abyte - 'A' + 13) % 26 + 'A') : abyte) | cap;
1092 tempReturn.append((char)abyte);
1093 }
1094 return tempReturn.toString();
1095
1096 }
1097 }
1098
1099
1100
1101 private void save() {
1102 if (DEBUG)
1103 System.out.println("Saving properties");
1104 try {
1105 FileOutputStream fos = new FileOutputStream(System.getProperty("user.home")
1106 + File.separator + "BuckoFIBS" + File.separator + propFile);
1107 store(fos, "BuckoFIBS properties");
1108 } catch (Exception e) {
1109 System.out.println("Exception while saving props:" + e);
1110 }
1111 }
1112
1113
1114 }