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). |
FileLimitPermission
public FileLimitPermission(long limit)
- Creates a new limited filelength permission with the provided length.
- Parameters:
limit
- maximum length of files in bytes
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
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.