Agent System POND 1.2 (28.2.2002)

PkgAgentSystem
Class FileLimitPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--PkgAgentSystem.FileLimitPermission
All Implemented Interfaces:
Guard, Serializable

public class FileLimitPermission
extends BasicPermission

Permission to write to files only a certain number of bytes.

Version:
1.0, 1.7.2000
Author:
Michael Sonntag
See Also:
LimitedFileOutputStream, Serialized Form

Constructor Summary
FileLimitPermission(long limit)
          Creates a new limited filelength permission with the provided length.
 
Method Summary
 boolean equals(Object obj)
          Compares tis permission to another one.
 String getActions()
          Returns the possible actions as a string.
 long getLimit()
          Retrieve the limit for the total length of files. return the limit in bytes
 boolean implies(Permission p)
          Returns true if this permission implies the parameter (true if the limit is smaller or equal).
 
Methods inherited from class java.security.BasicPermission
hashCode, newPermissionCollection
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileLimitPermission

public FileLimitPermission(long limit)
Creates a new limited filelength permission with the provided length.
Parameters:
limit - maximum length of files in bytes
Method Detail

implies

public boolean implies(Permission p)
Returns true if this permission implies the parameter (true if the limit is smaller or equal).
Overrides:
implies in class BasicPermission
Parameters:
p - the permission to compare
Returns:
true if the permission is implied by this one

equals

public boolean equals(Object obj)
Compares tis permission to another one. Returns true if the limit is the same.
Overrides:
equals in class BasicPermission
Parameters:
obj - the object to compare to this
Returns:
true if the object if a FileLimitPermission and limit is the same

getActions

public String getActions()
Returns the possible actions as a string.
Overrides:
getActions in class BasicPermission
Returns:
string with the possible actions

getLimit

public long getLimit()
Retrieve the limit for the total length of files. return the limit in bytes

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.