org.apache.axis.encoding.Base64.decode0()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(187)

本文整理了Java中org.apache.axis.encoding.Base64.decode0()方法的一些代码示例,展示了Base64.decode0()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.decode0()方法的具体详情如下:
包路径:org.apache.axis.encoding.Base64
类名称:Base64
方法名:decode0

Base64.decode0介绍

暂无

代码示例

代码示例来源:origin: axis/axis

  1. /**
  2. *
  3. */
  4. public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = off; i < off+len; i ++) {
  9. char ch = data[i];
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/axis

  1. /**
  2. *
  3. */
  4. public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = off; i < off+len; i ++) {
  9. char ch = data[i];
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

  1. /**
  2. *
  3. */
  4. public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = off; i < off+len; i ++) {
  9. char ch = data[i];
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(char[] data, int off, int len) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[len/4*3+3];
  8. int obufcount = 0;
  9. for (int i = off; i < off+len; i ++) {
  10. char ch = data[i];
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(char[] data, int off, int len) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[len/4*3+3];
  8. int obufcount = 0;
  9. for (int i = off; i < off+len; i ++) {
  10. char ch = data[i];
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

代码示例来源:origin: axis/axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(char[] data, int off, int len) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[len/4*3+3];
  8. int obufcount = 0;
  9. for (int i = off; i < off+len; i ++) {
  10. char ch = data[i];
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

代码示例来源:origin: axis/axis

  1. /**
  2. *
  3. */
  4. public static void decode(String data, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = 0; i < data.length(); i ++) {
  9. char ch = data.charAt(i);
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/axis

  1. /**
  2. *
  3. */
  4. public static void decode(String data, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = 0; i < data.length(); i ++) {
  9. char ch = data.charAt(i);
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

  1. /**
  2. *
  3. */
  4. public static void decode(String data, OutputStream ostream) throws IOException {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[3];
  8. for (int i = 0; i < data.length(); i ++) {
  9. char ch = data.charAt(i);
  10. if (ch == S_BASE64PAD
  11. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  12. ibuf[ibufcount++] = ch;
  13. if (ibufcount == ibuf.length) {
  14. ibufcount = 0;
  15. int obufcount = decode0(ibuf, obuf, 0);
  16. ostream.write(obuf, 0, obufcount);
  17. }
  18. }
  19. }
  20. }

代码示例来源:origin: org.apache.axis/axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(String data) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[data.length()/4*3+3];
  8. int obufcount = 0;
  9. for (int i = 0; i < data.length(); i ++) {
  10. char ch = data.charAt(i);
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

代码示例来源:origin: axis/axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(String data) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[data.length()/4*3+3];
  8. int obufcount = 0;
  9. for (int i = 0; i < data.length(); i ++) {
  10. char ch = data.charAt(i);
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

  1. /**
  2. *
  3. */
  4. public static byte[] decode(String data) {
  5. char[] ibuf = new char[4];
  6. int ibufcount = 0;
  7. byte[] obuf = new byte[data.length()/4*3+3];
  8. int obufcount = 0;
  9. for (int i = 0; i < data.length(); i ++) {
  10. char ch = data.charAt(i);
  11. if (ch == S_BASE64PAD
  12. || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
  13. ibuf[ibufcount++] = ch;
  14. if (ibufcount == ibuf.length) {
  15. ibufcount = 0;
  16. obufcount += decode0(ibuf, obuf, obufcount);
  17. }
  18. }
  19. }
  20. if (obufcount == obuf.length)
  21. return obuf;
  22. byte[] ret = new byte[obufcount];
  23. System.arraycopy(obuf, 0, ret, 0, obufcount);
  24. return ret;
  25. }

相关文章