Agent System POND 1.0 (1.7.2000)

PkgAgentSystem
Class FileLimitPermission

java.lang.Object
  |
  +--java.security.Permission
        |
        +--java.security.BasicPermission
              |
              +--PkgAgentSystem.FileLimitPermission

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).
Parameters:
p - the permission to compare
Returns:
true if the permission is implied by this one
Overrides:
implies in class BasicPermission

equals

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

getActions

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

getLimit

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

Agent System POND 1.0 (1.7.2000)

Submit a bug

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