Class ByteArrayDataSource

java.lang.Object
com.sun.istack.ByteArrayDataSource
All Implemented Interfaces:
DataSource

public final class ByteArrayDataSource extends Object implements DataSource
DataSource backed by a byte buffer.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • ByteArrayDataSource

      public ByteArrayDataSource(byte[] buf, String contentType)
      Parameters:
      buf - input buffer - the byte array isn't being copied; used directly
      contentType - content type
    • ByteArrayDataSource

      public ByteArrayDataSource(byte[] buf, int length, String contentType)
      Parameters:
      buf - input buffer - the byte array isn't being copied; used directly
      length - length
      contentType - content type
  • Method Details