/usr/share/doc/libcommons-codec-java/api/org/apache/commons/codec/binary/BaseNCodec.html is in libcommons-codec-java-doc 1.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_22) on Sat Apr 30 16:47:23 UTC 2011 -->
<TITLE>
BaseNCodec (Encode/Decode Utilities (Version 1.5-SNAPSHOT))
</TITLE>
<META NAME="date" CONTENT="2011-04-30">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BaseNCodec (Encode/Decode Utilities (Version 1.5-SNAPSHOT))";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BaseNCodec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodec.html" target="_top"><B>FRAMES</B></A>
<A HREF="BaseNCodec.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.codec.binary</FONT>
<BR>
Class BaseNCodec</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.codec.binary.BaseNCodec</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A>, <A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A>, <A HREF="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</A>, <A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/commons/codec/binary/Base32.html" title="class in org.apache.commons.codec.binary">Base32</A>, <A HREF="../../../../../org/apache/commons/codec/binary/Base64.html" title="class in org.apache.commons.codec.binary">Base64</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>BaseNCodec</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A>, <A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A></DL>
</PRE>
<P>
Abstract superclass for Base-N encoders and decoders.
<p>
This class is not thread-safe.
Each thread should use its own instance.
</p>
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#buffer">buffer</A></B></CODE>
<BR>
Buffer for streaming.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#chunkSeparatorLength">chunkSeparatorLength</A></B></CODE>
<BR>
Size of chunk separator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#currentLinePos">currentLinePos</A></B></CODE>
<BR>
Variable tracks how many characters have been written to the current line.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DEFAULT_BUFFER_RESIZE_FACTOR">DEFAULT_BUFFER_RESIZE_FACTOR</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DEFAULT_BUFFER_SIZE">DEFAULT_BUFFER_SIZE</A></B></CODE>
<BR>
Defines the default buffer size - currently 8192
- must be large enough for at least one encoded block+separator</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodedBlockSize">encodedBlockSize</A></B></CODE>
<BR>
Number of bytes in each full block of encoded data, e.g.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#eof">eof</A></B></CODE>
<BR>
Boolean flag to indicate the EOF has been reached.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength">lineLength</A></B></CODE>
<BR>
Chunksize for encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MASK_8BITS">MASK_8BITS</A></B></CODE>
<BR>
Mask used to extract 8 bits, used in decoding bytes</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#MIME_CHUNK_SIZE">MIME_CHUNK_SIZE</A></B></CODE>
<BR>
MIME chunk size per RFC 2045 section 6.8.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#modulus">modulus</A></B></CODE>
<BR>
Writes to the buffer only occur after every 3/5 reads when encoding, and every 4/8 reads when decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD">PAD</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PAD_DEFAULT">PAD_DEFAULT</A></B></CODE>
<BR>
Byte used to pad output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#PEM_CHUNK_SIZE">PEM_CHUNK_SIZE</A></B></CODE>
<BR>
PEM chunk size per RFC 1421 section 4.3.2.4.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#pos">pos</A></B></CODE>
<BR>
Position where next character should be written in the buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#readPos">readPos</A></B></CODE>
<BR>
Position where next character should be read from the buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#unencodedBlockSize">unencodedBlockSize</A></B></CODE>
<BR>
Number of bytes in each full block of unencoded data, e.g.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#BaseNCodec(int, int, int, int)">BaseNCodec</A></B>(int unencodedBlockSize,
int encodedBlockSize,
int lineLength,
int chunkSeparatorLength)</CODE>
<BR>
Note <code>lineLength</code> is rounded down to the nearest multiple of <A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodedBlockSize"><CODE>encodedBlockSize</CODE></A>
If <code>chunkSeparatorLength</code> is zero, then chunking is disabled.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#available()">available</A></B>()</CODE>
<BR>
Returns the amount of buffered data available for reading.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#containsAlphabetOrPad(byte[])">containsAlphabetOrPad</A></B>(byte[] arrayOctet)</CODE>
<BR>
Tests a given byte array to see if it contains any characters within the alphabet or PAD.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode(byte[])">decode</A></B>(byte[] pArray)</CODE>
<BR>
Decodes a byte[] containing characters in the Base-N alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode(byte[], int, int)">decode</A></B>(byte[] pArray,
int i,
int length)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode(java.lang.Object)">decode</A></B>(java.lang.Object pObject)</CODE>
<BR>
Decodes an Object using the Base-N algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#decode(java.lang.String)">decode</A></B>(java.lang.String pArray)</CODE>
<BR>
Decodes a String containing characters in the Base-N alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode(byte[])">encode</A></B>(byte[] pArray)</CODE>
<BR>
Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode(byte[], int, int)">encode</A></B>(byte[] pArray,
int i,
int length)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encode(java.lang.Object)">encode</A></B>(java.lang.Object pObject)</CODE>
<BR>
Encodes an Object using the Base-N algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeAsString(byte[])">encodeAsString</A></B>(byte[] pArray)</CODE>
<BR>
Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodeToString(byte[])">encodeToString</A></B>(byte[] pArray)</CODE>
<BR>
Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#ensureBufferSize(int)">ensureBufferSize</A></B>(int size)</CODE>
<BR>
Ensure that the buffer has room for <code>size</code> bytes</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getDefaultBufferSize()">getDefaultBufferSize</A></B>()</CODE>
<BR>
Get the default buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#getEncodedLength(byte[])">getEncodedLength</A></B>(byte[] pArray)</CODE>
<BR>
Calculates the amount of space needed to encode the supplied array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#hasData()">hasData</A></B>()</CODE>
<BR>
Returns true if this object has buffered data for reading.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet(byte)">isInAlphabet</A></B>(byte value)</CODE>
<BR>
Returns whether or not the <code>octet</code> is in the current alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet(byte[], boolean)">isInAlphabet</A></B>(byte[] arrayOctet,
boolean allowWSPad)</CODE>
<BR>
Tests a given byte array to see if it contains only valid characters within the alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet(java.lang.String)">isInAlphabet</A></B>(java.lang.String basen)</CODE>
<BR>
Tests a given String to see if it contains only valid characters within the alphabet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isWhiteSpace(byte)">isWhiteSpace</A></B>(byte byteToCheck)</CODE>
<BR>
Checks if a byte value is whitespace or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#readResults(byte[], int, int)">readResults</A></B>(byte[] b,
int bPos,
int bAvail)</CODE>
<BR>
Extracts buffered data into the provided byte[] array, starting at position bPos,
up to a maximum of bAvail bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#reset()">reset</A></B>()</CODE>
<BR>
Resets this object to its initial newly constructed state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#resizeBuffer()">resizeBuffer</A></B>()</CODE>
<BR>
Increases our buffer by the <A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DEFAULT_BUFFER_RESIZE_FACTOR"><CODE>DEFAULT_BUFFER_RESIZE_FACTOR</CODE></A>.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="MIME_CHUNK_SIZE"><!-- --></A><H3>
MIME_CHUNK_SIZE</H3>
<PRE>
public static final int <B>MIME_CHUNK_SIZE</B></PRE>
<DL>
<DD>MIME chunk size per RFC 2045 section 6.8.
<p>
The 76 character limit does not count the trailing CRLF, but counts all other characters, including any
equal signs.
</p>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045 section 6.8</a>,
<A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.MIME_CHUNK_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PEM_CHUNK_SIZE"><!-- --></A><H3>
PEM_CHUNK_SIZE</H3>
<PRE>
public static final int <B>PEM_CHUNK_SIZE</B></PRE>
<DL>
<DD>PEM chunk size per RFC 1421 section 4.3.2.4.
<p>
The 64 character limit does not count the trailing CRLF, but counts all other characters, including any
equal signs.
</p>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="http://tools.ietf.org/html/rfc1421">RFC 1421 section 4.3.2.4</a>,
<A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PEM_CHUNK_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_BUFFER_RESIZE_FACTOR"><!-- --></A><H3>
DEFAULT_BUFFER_RESIZE_FACTOR</H3>
<PRE>
private static final int <B>DEFAULT_BUFFER_RESIZE_FACTOR</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.DEFAULT_BUFFER_RESIZE_FACTOR">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_BUFFER_SIZE"><!-- --></A><H3>
DEFAULT_BUFFER_SIZE</H3>
<PRE>
private static final int <B>DEFAULT_BUFFER_SIZE</B></PRE>
<DL>
<DD>Defines the default buffer size - currently 8192
- must be large enough for at least one encoded block+separator
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.DEFAULT_BUFFER_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MASK_8BITS"><!-- --></A><H3>
MASK_8BITS</H3>
<PRE>
protected static final int <B>MASK_8BITS</B></PRE>
<DL>
<DD>Mask used to extract 8 bits, used in decoding bytes
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.MASK_8BITS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PAD_DEFAULT"><!-- --></A><H3>
PAD_DEFAULT</H3>
<PRE>
protected static final byte <B>PAD_DEFAULT</B></PRE>
<DL>
<DD>Byte used to pad output.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PAD_DEFAULT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="PAD"><!-- --></A><H3>
PAD</H3>
<PRE>
protected final byte <B>PAD</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.codec.binary.BaseNCodec.PAD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="unencodedBlockSize"><!-- --></A><H3>
unencodedBlockSize</H3>
<PRE>
private final int <B>unencodedBlockSize</B></PRE>
<DL>
<DD>Number of bytes in each full block of unencoded data, e.g. 4 for Base64 and 5 for Base32
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="encodedBlockSize"><!-- --></A><H3>
encodedBlockSize</H3>
<PRE>
private final int <B>encodedBlockSize</B></PRE>
<DL>
<DD>Number of bytes in each full block of encoded data, e.g. 3 for Base64 and 8 for Base32
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="lineLength"><!-- --></A><H3>
lineLength</H3>
<PRE>
protected final int <B>lineLength</B></PRE>
<DL>
<DD>Chunksize for encoding. Not used when decoding.
A value of zero or less implies no chunking of the encoded data.
Rounded down to nearest multiple of encodedBlockSize.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="chunkSeparatorLength"><!-- --></A><H3>
chunkSeparatorLength</H3>
<PRE>
private final int <B>chunkSeparatorLength</B></PRE>
<DL>
<DD>Size of chunk separator. Not used unless <A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#lineLength"><CODE>lineLength</CODE></A> > 0.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="buffer"><!-- --></A><H3>
buffer</H3>
<PRE>
protected byte[] <B>buffer</B></PRE>
<DL>
<DD>Buffer for streaming.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="pos"><!-- --></A><H3>
pos</H3>
<PRE>
protected int <B>pos</B></PRE>
<DL>
<DD>Position where next character should be written in the buffer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="readPos"><!-- --></A><H3>
readPos</H3>
<PRE>
private int <B>readPos</B></PRE>
<DL>
<DD>Position where next character should be read from the buffer.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="eof"><!-- --></A><H3>
eof</H3>
<PRE>
protected boolean <B>eof</B></PRE>
<DL>
<DD>Boolean flag to indicate the EOF has been reached. Once EOF has been reached, this object becomes useless,
and must be thrown away.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="currentLinePos"><!-- --></A><H3>
currentLinePos</H3>
<PRE>
protected int <B>currentLinePos</B></PRE>
<DL>
<DD>Variable tracks how many characters have been written to the current line. Only used when encoding. We use it to
make sure each encoded line never goes beyond lineLength (if lineLength > 0).
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="modulus"><!-- --></A><H3>
modulus</H3>
<PRE>
protected int <B>modulus</B></PRE>
<DL>
<DD>Writes to the buffer only occur after every 3/5 reads when encoding, and every 4/8 reads when decoding.
This variable helps track that.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="BaseNCodec(int, int, int, int)"><!-- --></A><H3>
BaseNCodec</H3>
<PRE>
protected <B>BaseNCodec</B>(int unencodedBlockSize,
int encodedBlockSize,
int lineLength,
int chunkSeparatorLength)</PRE>
<DL>
<DD>Note <code>lineLength</code> is rounded down to the nearest multiple of <A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#encodedBlockSize"><CODE>encodedBlockSize</CODE></A>
If <code>chunkSeparatorLength</code> is zero, then chunking is disabled.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>unencodedBlockSize</CODE> - the size of an unencoded block (e.g. Base64 = 3)<DD><CODE>encodedBlockSize</CODE> - the size of an encoded block (e.g. Base64 = 4)<DD><CODE>lineLength</CODE> - if > 0, use chunking with a length <code>lineLength</code><DD><CODE>chunkSeparatorLength</CODE> - the chunk separator length, if relevant</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="hasData()"><!-- --></A><H3>
hasData</H3>
<PRE>
boolean <B>hasData</B>()</PRE>
<DL>
<DD>Returns true if this object has buffered data for reading.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if there is data still available for reading.</DL>
</DD>
</DL>
<HR>
<A NAME="available()"><!-- --></A><H3>
available</H3>
<PRE>
int <B>available</B>()</PRE>
<DL>
<DD>Returns the amount of buffered data available for reading.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The amount of buffered data available for reading.</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultBufferSize()"><!-- --></A><H3>
getDefaultBufferSize</H3>
<PRE>
protected int <B>getDefaultBufferSize</B>()</PRE>
<DL>
<DD>Get the default buffer size. Can be overridden.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DEFAULT_BUFFER_SIZE"><CODE>DEFAULT_BUFFER_SIZE</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="resizeBuffer()"><!-- --></A><H3>
resizeBuffer</H3>
<PRE>
private void <B>resizeBuffer</B>()</PRE>
<DL>
<DD>Increases our buffer by the <A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#DEFAULT_BUFFER_RESIZE_FACTOR"><CODE>DEFAULT_BUFFER_RESIZE_FACTOR</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ensureBufferSize(int)"><!-- --></A><H3>
ensureBufferSize</H3>
<PRE>
protected void <B>ensureBufferSize</B>(int size)</PRE>
<DL>
<DD>Ensure that the buffer has room for <code>size</code> bytes
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - minimum spare space required</DL>
</DD>
</DL>
<HR>
<A NAME="readResults(byte[], int, int)"><!-- --></A><H3>
readResults</H3>
<PRE>
int <B>readResults</B>(byte[] b,
int bPos,
int bAvail)</PRE>
<DL>
<DD>Extracts buffered data into the provided byte[] array, starting at position bPos,
up to a maximum of bAvail bytes. Returns how many bytes were actually extracted.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - byte[] array to extract the buffered data into.<DD><CODE>bPos</CODE> - position in byte[] array to start extraction at.<DD><CODE>bAvail</CODE> - amount of bytes we're allowed to extract. We may extract fewer (if fewer are available).
<DT><B>Returns:</B><DD>The number of bytes successfully extracted into the provided byte[] array.</DL>
</DD>
</DL>
<HR>
<A NAME="isWhiteSpace(byte)"><!-- --></A><H3>
isWhiteSpace</H3>
<PRE>
protected static boolean <B>isWhiteSpace</B>(byte byteToCheck)</PRE>
<DL>
<DD>Checks if a byte value is whitespace or not.
Whitespace is taken to mean: space, tab, CR, LF
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>byteToCheck</CODE> - the byte to check
<DT><B>Returns:</B><DD>true if byte is whitespace, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
private void <B>reset</B>()</PRE>
<DL>
<DD>Resets this object to its initial newly constructed state.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
encode</H3>
<PRE>
public java.lang.Object <B>encode</B>(java.lang.Object pObject)
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
<DL>
<DD>Encodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of the
Encoder interface, and will throw an EncoderException if the supplied object is not of type byte[].
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to encode
<DT><B>Returns:</B><DD>An object (of type byte[]) containing the Base-N encoded data which corresponds to the byte[] supplied.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - if the parameter supplied is not of type byte[]</DL>
</DD>
</DL>
<HR>
<A NAME="encodeToString(byte[])"><!-- --></A><H3>
encodeToString</H3>
<PRE>
public java.lang.String <B>encodeToString</B>(byte[] pArray)</PRE>
<DL>
<DD>Encodes a byte[] containing binary data, into a String containing characters in the Base-N alphabet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - a byte array containing binary data
<DT><B>Returns:</B><DD>A String containing only Base-N character data</DL>
</DD>
</DL>
<HR>
<A NAME="decode(java.lang.Object)"><!-- --></A><H3>
decode</H3>
<PRE>
public java.lang.Object <B>decode</B>(java.lang.Object pObject)
throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
<DL>
<DD>Decodes an Object using the Base-N algorithm. This method is provided in order to satisfy the requirements of the
Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to decode
<DT><B>Returns:</B><DD>An object (of type byte[]) containing the binary data which corresponds to the byte[] or String supplied.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - if the parameter supplied is not of type byte[]</DL>
</DD>
</DL>
<HR>
<A NAME="decode(java.lang.String)"><!-- --></A><H3>
decode</H3>
<PRE>
public byte[] <B>decode</B>(java.lang.String pArray)</PRE>
<DL>
<DD>Decodes a String containing characters in the Base-N alphabet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - A String containing Base-N character data
<DT><B>Returns:</B><DD>a byte array containing binary data</DL>
</DD>
</DL>
<HR>
<A NAME="decode(byte[])"><!-- --></A><H3>
decode</H3>
<PRE>
public byte[] <B>decode</B>(byte[] pArray)</PRE>
<DL>
<DD>Decodes a byte[] containing characters in the Base-N alphabet.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode(byte[])">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - A byte array containing Base-N character data
<DT><B>Returns:</B><DD>a byte array containing binary data</DL>
</DD>
</DL>
<HR>
<A NAME="encode(byte[])"><!-- --></A><H3>
encode</H3>
<PRE>
public byte[] <B>encode</B>(byte[] pArray)</PRE>
<DL>
<DD>Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - a byte array containing binary data
<DT><B>Returns:</B><DD>A byte array containing only the basen alphabetic character data</DL>
</DD>
</DL>
<HR>
<A NAME="encodeAsString(byte[])"><!-- --></A><H3>
encodeAsString</H3>
<PRE>
public java.lang.String <B>encodeAsString</B>(byte[] pArray)</PRE>
<DL>
<DD>Encodes a byte[] containing binary data, into a String containing characters in the appropriate alphabet.
Uses UTF8 encoding.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - a byte array containing binary data
<DT><B>Returns:</B><DD>String containing only character data in the appropriate alphabet.</DL>
</DD>
</DL>
<HR>
<A NAME="encode(byte[], int, int)"><!-- --></A><H3>
encode</H3>
<PRE>
abstract void <B>encode</B>(byte[] pArray,
int i,
int length)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="decode(byte[], int, int)"><!-- --></A><H3>
decode</H3>
<PRE>
abstract void <B>decode</B>(byte[] pArray,
int i,
int length)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isInAlphabet(byte)"><!-- --></A><H3>
isInAlphabet</H3>
<PRE>
protected abstract boolean <B>isInAlphabet</B>(byte value)</PRE>
<DL>
<DD>Returns whether or not the <code>octet</code> is in the current alphabet.
Does not allow whitespace or pad.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The value to test
<DT><B>Returns:</B><DD><code>true</code> if the value is defined in the current alphabet, <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isInAlphabet(byte[], boolean)"><!-- --></A><H3>
isInAlphabet</H3>
<PRE>
public boolean <B>isInAlphabet</B>(byte[] arrayOctet,
boolean allowWSPad)</PRE>
<DL>
<DD>Tests a given byte array to see if it contains only valid characters within the alphabet.
The method optionally treats whitespace and pad as valid.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>arrayOctet</CODE> - byte array to test<DD><CODE>allowWSPad</CODE> - if <code>true</code>, then whitespace and PAD are also allowed
<DT><B>Returns:</B><DD><code>true</code> if all bytes are valid characters in the alphabet or if the byte array is empty;
<code>false</code>, otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isInAlphabet(java.lang.String)"><!-- --></A><H3>
isInAlphabet</H3>
<PRE>
public boolean <B>isInAlphabet</B>(java.lang.String basen)</PRE>
<DL>
<DD>Tests a given String to see if it contains only valid characters within the alphabet.
The method treats whitespace and PAD as valid.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>basen</CODE> - String to test
<DT><B>Returns:</B><DD><code>true</code> if all characters in the String are valid characters in the alphabet or if
the String is empty; <code>false</code>, otherwise<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodec.html#isInAlphabet(byte[], boolean)"><CODE>isInAlphabet(byte[], boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="containsAlphabetOrPad(byte[])"><!-- --></A><H3>
containsAlphabetOrPad</H3>
<PRE>
protected boolean <B>containsAlphabetOrPad</B>(byte[] arrayOctet)</PRE>
<DL>
<DD>Tests a given byte array to see if it contains any characters within the alphabet or PAD.
Intended for use in checking line-ending arrays
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>arrayOctet</CODE> - byte array to test
<DT><B>Returns:</B><DD><code>true</code> if any byte is a valid character in the alphabet or PAD; <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="getEncodedLength(byte[])"><!-- --></A><H3>
getEncodedLength</H3>
<PRE>
public long <B>getEncodedLength</B>(byte[] pArray)</PRE>
<DL>
<DD>Calculates the amount of space needed to encode the supplied array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pArray</CODE> - byte[] array which will later be encoded
<DT><B>Returns:</B><DD>amount of space needed to encoded the supplied array.
Returns a long since a max-len array will require > Integer.MAX_VALUE</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BaseNCodec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../org/apache/commons/codec/binary/Base64OutputStream.html" title="class in org.apache.commons.codec.binary"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/apache/commons/codec/binary/BaseNCodecInputStream.html" title="class in org.apache.commons.codec.binary"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/commons/codec/binary/BaseNCodec.html" target="_top"><B>FRAMES</B></A>
<A HREF="BaseNCodec.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
commons-codec version 1.5-SNAPSHOT - Copyright © 2002-2011 - Apache Software Foundation
</BODY>
</HTML>
|