Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Transport

The transport package offers utilities for handling OSID data streams.

ByteBufferDataInputStream

ByteBufferDataInputStream is an implementation of osid.transport.DataInputStream based on a java.nio.ByteBuffer. The java.nio.ByteBuffer should be flipped so the ByteBufferDataInputStream can read it. The ByteBufferDataInputStream will consume the buffer given to it. If the caller wishes to retain the buffer for other purposes, it should pass in a duplicate buffer.

try {
    java.io.File imageFile = new java.io.File("picture.jpg");
    java.awt.image.BufferedImage img = javax.imageio.ImageIO.read(imageFile);
 
  • No labels