aQute.lib.base64.Base64.encode()方法的使用及代码示例

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

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

Base64.encode介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public static String encodeBase64(InputStream in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static String encodeBase64(File in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static String encodeBase64(InputStream in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

public static String encodeBase64(InputStream in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

public static String encodeBase64(InputStream in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public static String encodeBase64(InputStream in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public static String encodeBase64(File in) throws IOException {
  StringWriter sw = new StringWriter();
  encode(in, sw);
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/bndlib

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  }
  catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/bnd

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  }
  catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: org.osgi/osgi.enroute.logger.simple.provider

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  }
  catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  } catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  } catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  } catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public static String encodeBase64(byte data[]) {
  StringWriter sw = new StringWriter();
  ByteArrayInputStream bin = new ByteArrayInputStream(data);
  try {
    encode(bin, sw);
  } catch (IOException e) {
    // can't happen
  }
  return sw.toString();
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static void encode(File in, Appendable sb) throws IOException {
  if (in.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File > 4Gb " + in);
  encode(new BufferedInputStream(Files.newInputStream(in.toPath())), sb, (int) in.length());
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

public static void encode(File in, Appendable sb) throws IOException {
  if (in.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File > 4Gb " + in);
  encode(new BufferedInputStream(Files.newInputStream(in.toPath())), sb, (int) in.length());
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public static void encode(File in, Appendable sb) throws IOException {
  if (in.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File > 4Gb " + in);
  encode(new BufferedInputStream(Files.newInputStream(in.toPath())), sb, (int) in.length());
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public static void encode(File in, Appendable sb) throws IOException {
  if (in.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File > 4Gb " + in);
  encode(new BufferedInputStream(Files.newInputStream(in.toPath())), sb, (int) in.length());
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception {
  File f = (File) object;
  if (!f.isFile())
    throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f);
  try (InputStream in = IO.stream(f)) {
    app.append('"');
    Base64.encode(in, app);
    app.append('"');
  }
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

@Override
public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception {
  File f = (File) object;
  if (!f.isFile())
    throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f);
  try (InputStream in = IO.stream(f)) {
    app.append('"');
    Base64.encode(in, app);
    app.append('"');
  }
}

相关文章

微信公众号

最新文章

更多