Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


waggle.core.api
Class XAPIInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by waggle.core.api.XAPIInputStream

All Implemented Interfaces:
Closeable, org.apache.commons.httpclient.methods.multipart.PartSource

public final class XAPIInputStream
extends InputStream
implements org.apache.commons.httpclient.methods.multipart.PartSource

This is how you send larger pieces of content. Used as value of API parameters that require an InputStream.


Constructor Summary
XAPIInputStream(byte[] bytes)
          Used as an argument to any function requiring an InputStream argument.
XAPIInputStream(File file)
          Used as an argument to any function requiring an InputStream argument.
XAPIInputStream(InputStream inputStream, long length)
          Used as a return value.
XAPIInputStream(String string)
          Used as an argument to any function requiring an InputStream argument.

 

Method Summary
 int available()
           
 void close()
           
 InputStream createInputStream()
           
 String getFileName()
           
 long getLength()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

XAPIInputStream

public XAPIInputStream(String string)
Used as an argument to any function requiring an InputStream argument.
Parameters:
string - The String.

XAPIInputStream

public XAPIInputStream(byte[] bytes)
Used as an argument to any function requiring an InputStream argument.
Parameters:
bytes - The bytes.

XAPIInputStream

public XAPIInputStream(File file)
Used as an argument to any function requiring an InputStream argument.
Parameters:
file - The file.

XAPIInputStream

public XAPIInputStream(InputStream inputStream,
                       long length)
Used as a return value.
Parameters:
inputStream - The InputStream.
length - The length in bytes of the InputStream.

Method Detail

getLength

public long getLength()
Specified by:
getLength in interface org.apache.commons.httpclient.methods.multipart.PartSource

getFileName

public String getFileName()
Specified by:
getFileName in interface org.apache.commons.httpclient.methods.multipart.PartSource

createInputStream

public InputStream createInputStream()
                              throws IOException
Specified by:
createInputStream in interface org.apache.commons.httpclient.methods.multipart.PartSource
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

mark

public void mark(int readLimit)
Overrides:
mark in class InputStream

reset

public void reset()
           throws IOException
Overrides:
reset in class InputStream
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

Skip navigation links

Oracle® On Track Communication SDK Documentation
Release 1(1.0)

E20955-01


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.