MCPcopy Create free account
hub / github.com/M66B/FairEmail / decode

Method decode

app/src/main/java/javax/mail/internet/MimeUtility.java:365–384  ·  view source on GitHub ↗

Decode the given input stream. The Input stream returned is the decoded input stream. All the encodings defined in RFC 2045 are supported here. They include "base64", "quoted-printable", "7bit", "8bit", and "binary". In addition, "uuencode" is also supported. In the current implementation, if t

(InputStream is, String encoding)

Source from the content-addressed store, hash-verified

363 * @exception MessagingException if the encoding is unknown
364 */
365 public static InputStream decode(InputStream is, String encoding)
366 throws MessagingException {
367 if (encoding.equalsIgnoreCase("base64"))
368 return new BASE64DecoderStream(is);
369 else if (encoding.equalsIgnoreCase("quoted-printable"))
370 return new QPDecoderStream(is);
371 else if (encoding.equalsIgnoreCase("uuencode") ||
372 encoding.equalsIgnoreCase("x-uuencode") ||
373 encoding.equalsIgnoreCase("x-uue"))
374 return new UUDecoderStream(is);
375 else if (encoding.equalsIgnoreCase("binary") ||
376 encoding.equalsIgnoreCase("7bit") ||
377 encoding.equalsIgnoreCase("8bit"))
378 return is;
379 else {
380 if (!ignoreUnknownEncoding)
381 throw new MessagingException("Unknown encoding: " + encoding);
382 return is;
383 }
384 }
385
386 /**
387 * Wrap an encoder around the given output stream.

Callers 15

writeToMethod · 0.95
getInputStreamMethod · 0.95
getInputStreamMethod · 0.95
onExecuteMethod · 0.45
isValidMethod · 0.45
formatMethod · 0.45
getDataUriStreamMethod · 0.45
getCertificateMethod · 0.45
sanitizeMethod · 0.45
getBraveDebounceMethod · 0.45
transformMethod · 0.45
onExecuteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected