NetKernel APIs


org.ten60.netkernel.layer1.representation
Class ReadableURLAspect

java.lang.Object
  extended byorg.ten60.netkernel.layer1.representation.ReadableURLAspect
All Implemented Interfaces:
IAspectBinaryStream, IAspectReadableBinaryStream, IURAspect

public class ReadableURLAspect
extends Object
implements IAspectReadableBinaryStream

ReadableURLAspect


Constructor Summary
ReadableURLAspect(URL aURL)
          Creates a new instance of ReadableURLAspect
 
Method Summary
 int getContentLength()
          Return the length of the stream, -1 means unknown length
 String getContentType()
           
 String getEncoding()
           
 long getExpiration()
           
 InputStream getInputStream()
          Return an input stream to read the data
 void write(OutputStream aStream)
          Write state to OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadableURLAspect

public ReadableURLAspect(URL aURL)
Creates a new instance of ReadableURLAspect

Method Detail

getContentLength

public int getContentLength()
Description copied from interface: IAspectReadableBinaryStream
Return the length of the stream, -1 means unknown length

Specified by:
getContentLength in interface IAspectReadableBinaryStream

getExpiration

public long getExpiration()

getEncoding

public String getEncoding()
Specified by:
getEncoding in interface IAspectBinaryStream

getContentType

public String getContentType()

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: IAspectReadableBinaryStream
Return an input stream to read the data

Specified by:
getInputStream in interface IAspectReadableBinaryStream
Throws:
IOException

write

public void write(OutputStream aStream)
           throws IOException
Description copied from interface: IAspectBinaryStream
Write state to OutputStream

Specified by:
write in interface IAspectBinaryStream
Parameters:
aStream - the output stream
Throws:
IOException - thrown if we fail to write

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.