Java – Base64.Encoder Class

Java Base64.Encoder Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.

Methods in Java Base64.Encoder Class

S.No Method & Description
1 byte[] encode(byte[] src)

Encodes all bytes from the specified byte array into a newly-allocated byte array using the Base64 encoding scheme.
2 int encode(byte[] src, byte[] dst)

Encodes all bytes from the specified byte array using the Base64 encoding scheme, writing the resulting bytes to the given output byte array, starting at offset 0.
3 ByteBuffer encode(ByteBuffer buffer)

Encodes all remaining bytes from the specified byte buffer into a newly-allocated ByteBuffer using the Base64 encoding scheme.
4 String encodeToString(byte[] src)

Encodes the specified byte array into a String using the Base64 encoding scheme.
5 Base64.Encoder withoutPadding()

Returns an encoder instance that encodes equivalently to this one, but without adding any padding character at the end of the encoded byte data.
6 OutputStream wrap(OutputStream os)

Wraps an output stream for encoding byte data using the Base64 encoding scheme.

Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java RegEx to validate Date – dd/mm/yyyy pattern
  2. Java ArrayList isEmpty() method with example
  3. Java – ForkJoinPool.ManagedBlocker Interface
  4. Java – Objects Class in Util Package
  5. Java – CopyOnWriteArraySet Class
  6. Java – Comparator Interface
  7. Java – IntStream.Builder Interface
  8. Java ArrayList listIterator() method with example
  9. Java – AtomicInteger Class
  10. Java – LinkedTransferQueue Class
  11. Java – DoubleConsumer Interface
  12. Java – ConcurrentLinkedDeque Class
  13. Java – Comparable Interface
  14. Java – OptionalLong Class
  15. Java – Calendar Class

Be the first to comment

Leave a Reply