JOrphanUtils.html
53.3 KB
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>JOrphanUtils (Apache JMeter API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="JOrphanUtils (Apache JMeter API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/jorphan/util/JMeterStopThreadException.html" title="class in org.apache.jorphan.util"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/jorphan/util/ThreadDumper.html" title="class in org.apache.jorphan.util"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/jorphan/util/JOrphanUtils.html" target="_top">Frames</a></li>
<li><a href="JOrphanUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.jorphan.util</div>
<h2 title="Class JOrphanUtils" class="title">Class JOrphanUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.jorphan.util.JOrphanUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">JOrphanUtils</span>
extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class contains frequently-used static utility methods.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#baToHexBytes-byte:A-">baToHexBytes</a></span>(byte[] ba)</code>
<div class="block">Convert binary byte array to hex string.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#baToHexString-byte:A-">baToHexString</a></span>(byte[] ba)</code>
<div class="block">Convert binary byte array to hex string.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#baToHexString-byte:A-char-">baToHexString</a></span>(byte[] ba,
char separator)</code>
<div class="block">Convert binary byte array to hex string.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#booleanToSTRING-boolean-">booleanToSTRING</a></span>(boolean value)</code>
<div class="block">Convert a boolean to its upper case string representation.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#canSafelyWriteToFolder-java.io.File-">canSafelyWriteToFolder</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> folder)</code>
<div class="block">Throw <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if folder cannot be written to either:
Because it exists but is not a folder
Because it exists but is not empty
Because it does not exist but cannot be created
</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#closeQuietly-java.io.Closeable-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a> cl)</code>
<div class="block">Close a Closeable with no error thrown</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#closeQuietly-java.net.ServerSocket-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a> sock)</code>
<div class="block">close a Socket with no error thrown</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#closeQuietly-java.net.Socket-">closeQuietly</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a> sock)</code>
<div class="block">close a Socket with no error thrown</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#displayThreads-boolean-">displayThreads</a></span>(boolean includeDaemons)</code>
<div class="block">Display currently running threads on system.out
This may be expensive to run.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#formatDuration-long-">formatDuration</a></span>(long elapsedSec)</code> </td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#getByteArraySlice-byte:A-int-int-">getByteArraySlice</a></span>(byte[] array,
int begin,
int end)</code>
<div class="block">Returns a slice of a byte array.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#isBlank-java.lang.String-">isBlank</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code>
<div class="block">Check that value is empty (""), null or whitespace only.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#isXML-byte:A-">isXML</a></span>(byte[] target)</code>
<div class="block">Detects if some content starts with the standard XML prefix.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#leftAlign-java.lang.StringBuilder-int-">leftAlign</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> in,
int len)</code>
<div class="block">Left aligns some text in a StringBuilder N.B. modifies the input buffer</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#nullifyIfEmptyTrimmed-java.lang.String-">nullifyIfEmptyTrimmed</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</code>
<div class="block">Returns null if input is empty, null or contains spaces</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#read-java.io.InputStream-byte:A-int-int-">read</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> is,
byte[] buffer,
int offset,
int length)</code>
<div class="block">Read as much as possible into buffer.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#replaceAllChars-java.lang.String-char-java.lang.String-">replaceAllChars</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
char search,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replace)</code>
<div class="block">Version of String.replaceAll() for JDK1.3
See below for another version which replaces strings rather than chars
and provides a fast path which does not allocate memory</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#replaceAllWithRegex-java.lang.String-java.lang.String-java.lang.String-boolean-">replaceAllWithRegex</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> regex,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replacement,
boolean caseSensitive)</code>
<div class="block">Replace in source all matches of regex by replacement taking
into account case if caseSensitive is true</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#replaceFirst-java.lang.String-java.lang.String-java.lang.String-">replaceFirst</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> search,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replace)</code>
<div class="block">Simple-minded String.replace() for JDK1.3 Should probably be recoded...</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#rightAlign-java.lang.StringBuilder-int-">rightAlign</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> in,
int len)</code>
<div class="block">Right aligns some text in a StringBuilder N.B. modifies the input buffer</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-">split</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splitChar)</code> </td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-boolean-">split</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splitChar,
boolean truncate)</code>
<div class="block">This is _almost_ equivalent to the String.split method in JDK 1.4.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-java.lang.String-">split</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> delims,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> def)</code>
<div class="block">Takes a String and a tokenizer character string, and returns a new array of
strings of the string split by the tokenizer character(s).</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#startsWith-byte:A-byte:A-int-">startsWith</a></span>(byte[] target,
byte[] search,
int offset)</code>
<div class="block">Check if a byte array starts with the given byte array.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#substitute-java.lang.String-java.lang.String-java.lang.String-">substitute</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sub)</code>
<div class="block">Replace all patterns in a String</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#trim-java.lang.String-java.lang.String-">trim</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> delims)</code>
<div class="block">Trim a string by the tokens provided.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#write-byte:A-java.io.OutputStream-">write</a></span>(byte[] data,
<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)</code>
<div class="block">Write data to an output stream in chunks with a maximum size of 4K.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="split-java.lang.String-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] split(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splitChar,
boolean truncate)</pre>
<div class="block">This is _almost_ equivalent to the String.split method in JDK 1.4. It is
here to enable us to support earlier JDKs.
Note that unlike JDK1.4 split(), it optionally ignores leading split Characters,
and the splitChar parameter is not a Regular expression
<P>
This piece of code used to be part of JMeterUtils, but was moved here
because some JOrphan classes use it too.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>splittee</code> - String to be split</dd>
<dd><code>splitChar</code> - Character(s) to split the string on, these are treated as a single unit</dd>
<dd><code>truncate</code> - Should adjacent and leading/trailing splitChars be removed?</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of all the tokens; empty if the input string is null or the splitChar is null</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-java.lang.String-"><code>split(String, String, String)</code></a></dd>
</dl>
</li>
</ul>
<a name="split-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] split(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splitChar)</pre>
</li>
</ul>
<a name="split-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] split(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> splittee,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> delims,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> def)</pre>
<div class="block">Takes a String and a tokenizer character string, and returns a new array of
strings of the string split by the tokenizer character(s).
Trailing delimiters are significant (unless the default = null)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>splittee</code> - String to be split.</dd>
<dd><code>delims</code> - Delimiter character(s) to split the string on</dd>
<dd><code>def</code> - Default value to place between two split chars that have
nothing between them. If null, then ignore omitted elements.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of all the tokens.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if splittee or delims are null</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-boolean-"><code>split(String, String, boolean)</code></a>,
<a href="../../../../org/apache/jorphan/util/JOrphanUtils.html#split-java.lang.String-java.lang.String-"><code>This is a rewritten version of JMeterUtils.split()</code></a></dd>
</dl>
</li>
</ul>
<a name="rightAlign-java.lang.StringBuilder-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rightAlign</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> rightAlign(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> in,
int len)</pre>
<div class="block">Right aligns some text in a StringBuilder N.B. modifies the input buffer</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - StringBuilder containing some text</dd>
<dd><code>len</code> - output length desired</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>input StringBuilder, with leading spaces</dd>
</dl>
</li>
</ul>
<a name="leftAlign-java.lang.StringBuilder-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>leftAlign</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> leftAlign(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang">StringBuilder</a> in,
int len)</pre>
<div class="block">Left aligns some text in a StringBuilder N.B. modifies the input buffer</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - StringBuilder containing some text</dd>
<dd><code>len</code> - output length desired</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>input StringBuilder, with trailing spaces</dd>
</dl>
</li>
</ul>
<a name="booleanToSTRING-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>booleanToSTRING</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> booleanToSTRING(boolean value)</pre>
<div class="block">Convert a boolean to its upper case string representation.
Equivalent to Boolean.valueOf(boolean).toString().toUpperCase().</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - boolean to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>"TRUE" or "FALSE"</dd>
</dl>
</li>
</ul>
<a name="replaceFirst-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replaceFirst</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replaceFirst(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> search,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replace)</pre>
<div class="block">Simple-minded String.replace() for JDK1.3 Should probably be recoded...</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - input string</dd>
<dd><code>search</code> - string to look for (no regular expressions)</dd>
<dd><code>replace</code> - string to replace the search string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the output string</dd>
</dl>
</li>
</ul>
<a name="replaceAllChars-java.lang.String-char-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replaceAllChars</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replaceAllChars(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
char search,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replace)</pre>
<div class="block">Version of String.replaceAll() for JDK1.3
See below for another version which replaces strings rather than chars
and provides a fast path which does not allocate memory</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - input string</dd>
<dd><code>search</code> - char to look for (no regular expressions)</dd>
<dd><code>replace</code> - string to replace the search string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the output string</dd>
</dl>
</li>
</ul>
<a name="substitute-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substitute</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> substitute(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> pattern,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> sub)</pre>
<div class="block">Replace all patterns in a String</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - - string to be transformed</dd>
<dd><code>pattern</code> - - pattern to replace</dd>
<dd><code>sub</code> - - replacement</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the updated string</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#replaceAll-java.lang.String-java.lang.String-" title="class or interface in java.lang"><code>- JDK1.4 only</code></a></dd>
</dl>
</li>
</ul>
<a name="trim-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trim</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> trim(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> delims)</pre>
<div class="block">Trim a string by the tokens provided.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - string to trim</dd>
<dd><code>delims</code> - list of delimiters</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>input trimmed at the first delimiter</dd>
</dl>
</li>
</ul>
<a name="getByteArraySlice-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteArraySlice</h4>
<pre>public static byte[] getByteArraySlice(byte[] array,
int begin,
int end)</pre>
<div class="block">Returns a slice of a byte array.
TODO - add bounds checking?</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - -
input array</dd>
<dd><code>begin</code> - -
start of slice</dd>
<dd><code>end</code> - -
end of slice</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>slice from the input array</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.io.Closeable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static void closeQuietly(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a> cl)</pre>
<div class="block">Close a Closeable with no error thrown</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cl</code> - - Closeable (may be null)</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.net.Socket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static void closeQuietly(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a> sock)</pre>
<div class="block">close a Socket with no error thrown</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sock</code> - - Socket (may be null)</dd>
</dl>
</li>
</ul>
<a name="closeQuietly-java.net.ServerSocket-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeQuietly</h4>
<pre>public static void closeQuietly(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/ServerSocket.html?is-external=true" title="class or interface in java.net">ServerSocket</a> sock)</pre>
<div class="block">close a Socket with no error thrown</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sock</code> - - ServerSocket (may be null)</dd>
</dl>
</li>
</ul>
<a name="startsWith-byte:A-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startsWith</h4>
<pre>public static boolean startsWith(byte[] target,
byte[] search,
int offset)</pre>
<div class="block">Check if a byte array starts with the given byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - array to scan</dd>
<dd><code>search</code> - array to search for</dd>
<dd><code>offset</code> - starting offset (>=0)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the search array matches the target at the current offset</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#startsWith-java.lang.String-int-" title="class or interface in java.lang"><code>String.startsWith(String, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="isXML-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isXML</h4>
<pre>public static boolean isXML(byte[] target)</pre>
<div class="block">Detects if some content starts with the standard XML prefix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - the content to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the document starts with the standard XML prefix.</dd>
</dl>
</li>
</ul>
<a name="baToHexString-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baToHexString</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> baToHexString(byte[] ba)</pre>
<div class="block">Convert binary byte array to hex string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ba</code> - input binary byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>hex representation of binary input</dd>
</dl>
</li>
</ul>
<a name="baToHexString-byte:A-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baToHexString</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> baToHexString(byte[] ba,
char separator)</pre>
<div class="block">Convert binary byte array to hex string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ba</code> - input binary byte array</dd>
<dd><code>separator</code> - the separator to be added between pairs of hex digits</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>hex representation of binary input</dd>
</dl>
</li>
</ul>
<a name="baToHexBytes-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baToHexBytes</h4>
<pre>public static byte[] baToHexBytes(byte[] ba)</pre>
<div class="block">Convert binary byte array to hex string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ba</code> - input binary byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>hex representation of binary input</dd>
</dl>
</li>
</ul>
<a name="read-java.io.InputStream-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public static int read(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> is,
byte[] buffer,
int offset,
int length)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Read as much as possible into buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>is</code> - the stream to read from</dd>
<dd><code>buffer</code> - output buffer</dd>
<dd><code>offset</code> - offset into buffer</dd>
<dd><code>length</code> - number of bytes to read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes actually read</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if some I/O errors occur</dd>
</dl>
</li>
</ul>
<a name="displayThreads-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>displayThreads</h4>
<pre>public static void displayThreads(boolean includeDaemons)</pre>
<div class="block">Display currently running threads on system.out
This may be expensive to run.
Mainly designed for use at the end of a non-GUI test to check for threads that might prevent the JVM from exiting.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>includeDaemons</code> - whether to include daemon threads or not.</dd>
</dl>
</li>
</ul>
<a name="nullifyIfEmptyTrimmed-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nullifyIfEmptyTrimmed</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> nullifyIfEmptyTrimmed(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> input)</pre>
<div class="block">Returns null if input is empty, null or contains spaces</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - String</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String</dd>
</dl>
</li>
</ul>
<a name="isBlank-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBlank</h4>
<pre>public static boolean isBlank(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre>
<div class="block">Check that value is empty (""), null or whitespace only.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - Value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the String is not empty (""), not null and not whitespace only.</dd>
</dl>
</li>
</ul>
<a name="write-byte:A-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public static void write(byte[] data,
<a href="http://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write data to an output stream in chunks with a maximum size of 4K.
This is to avoid OutOfMemory issues if the data buffer is very large
and the JVM needs to copy the buffer for use by native code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the buffer to be written</dd>
<dd><code>output</code> - the output stream to use</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if there is a problem writing the data</dd>
</dl>
</li>
</ul>
<a name="formatDuration-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>formatDuration</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> formatDuration(long elapsedSec)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>elapsedSec</code> - long elapsed time in seconds</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String formatted with format HH:mm:ss</dd>
</dl>
</li>
</ul>
<a name="canSafelyWriteToFolder-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canSafelyWriteToFolder</h4>
<pre>public static void canSafelyWriteToFolder(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> folder)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Throw <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if folder cannot be written to either:
<ul>
<li>Because it exists but is not a folder</li>
<li>Because it exists but is not empty</li>
<li>Because it does not exist but cannot be created</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>folder</code> - <a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><code>File</code></a></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when folder can't be written to</dd>
</dl>
</li>
</ul>
<a name="replaceAllWithRegex-java.lang.String-java.lang.String-java.lang.String-boolean-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>replaceAllWithRegex</h4>
<pre>public static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[] replaceAllWithRegex(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> source,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> regex,
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> replacement,
boolean caseSensitive)</pre>
<div class="block">Replace in source all matches of regex by replacement taking
into account case if caseSensitive is true</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - Source text</dd>
<dd><code>regex</code> - Regular expression</dd>
<dd><code>replacement</code> - Replacement text to which function applies a quoting</dd>
<dd><code>caseSensitive</code> - is case taken into account</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>array of Object where first row is the replaced text, second row is the number of replacement that occured</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/jorphan/util/JMeterStopThreadException.html" title="class in org.apache.jorphan.util"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../org/apache/jorphan/util/ThreadDumper.html" title="class in org.apache.jorphan.util"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/jorphan/util/JOrphanUtils.html" target="_top">Frames</a></li>
<li><a href="JOrphanUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 1998-2017 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>