• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
quintesse / ceylon.buffer / 1.3.0
Ceylon Buffer Platform Module
Category SDK

The Ceylon SDK

Backends JVM JavaScript
Maven coordinates
Compatible Ceylon release JVM: 1.2.x, 1.3.x (latest)
JavaScript: 1.2.1, 1.2.2, 1.3.x (latest)
Published Sep 15, 2016
Stats Downloads (JVM): 622
Downloads (JS): 108
Source downloads: 612
Authors Alex Szczuczko
Stéphane Épardaud
Description

This module allows you to convert between text and binary forms of data.

For efficiency of I/O (see the ceylon.io module), Buffers are the core representation which ceylon.buffer.codec::Codecs output from the encode/decode operations, but it's still easy to get more general types like Arrays and Strings. Input to the operations can be any stream type.

ceylon.buffer.codec::Codecs are symmetrical, as any data that is encoded then decoded (or vice versa) with the same codec will be at least semantically equivalent to the starting data, and usually exactly equal.

ceylon.buffer.codec::Codecs come in four flavours: ByteToByte, ByteToCharacter, CharacterToByte, and CharacterToCharacter. The middle two are similar, yet kept seperate to support differing conventions around what encode and decode mean in particular codec families. To enhance efficiency, ByteToByteCodecs are offered as variants of some CharacterToByteCodecs where the Character form is comprised of ASCII characters only. These variants' output is the same as using the original plus encoding the characters with the ASCII charset.

There are three currently implemented codec families: charsets (UTF-8 for example), base encodings (like base64), and text ciphers (rot13 for example). See those packages for further documentation and examples of use.

Dependencies
All backends JVM JavaScript
ceylon.collection/1.3.0
ceylon.language/1.3.0
ceylon.interop.java/1.3.0
java.base/7 JDK
Usage
  • Import
 import ceylon.buffer "1.3.0";
Module links Members
Imported By
Home
Code repository
Issue tracker
Browse
Download .car
Download .js
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2023 Red Hat. About