org.rhq.plugins.platform.content.yum
Class Package

java.lang.Object
  extended by org.rhq.plugins.platform.content.yum.Content
      extended by org.rhq.plugins.platform.content.yum.Package

public class Package
extends Content

Represents an rpm package.

Author:
jortel

Field Summary
 
Fields inherited from class org.rhq.plugins.platform.content.yum.Content
bfr, log, request
 
Constructor Summary
Package(org.rhq.plugins.platform.content.yum.Request request)
          Construct a package with an active yum request object.
 
Method Summary
 long length()
          Get the length in bytes of this package.
 InputStream openStream()
          Open an input stream for the package bits.
 void writeContent(OutputStream ostr)
          Write the content (bits) for this package to the specified stream.
 void writeHeader(OutputStream ostr)
          Write the http header for this package to the specified stream.
 
Methods inherited from class org.rhq.plugins.platform.content.yum.Content
context, delete, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Package

public Package(org.rhq.plugins.platform.content.yum.Request request)
Construct a package with an active yum request object.

Parameters:
request - An active yum request.
Method Detail

length

public long length()
            throws Exception
Get the length in bytes of this package.

Specified by:
length in class Content
Returns:
The lengh of this package.
Throws:
Exception - on all errors.

openStream

public InputStream openStream()
                       throws Exception
Open an input stream for the package bits.

Specified by:
openStream in class Content
Throws:
Exception - On error.

writeHeader

public void writeHeader(OutputStream ostr)
                 throws Exception
Write the http header for this package to the specified stream.

Specified by:
writeHeader in class Content
Parameters:
ostr - An open output stream.
Throws:
Exception - On all errors.

writeContent

public void writeContent(OutputStream ostr)
                  throws Exception
Write the content (bits) for this package to the specified stream.

Specified by:
writeContent in class Content
Parameters:
ostr - An open output stream.
Throws:
Exception - On all errors.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.