public class RobotsTxt
extends java.lang.Object
Constructor and Description |
---|
RobotsTxt()
create empty instance allowing everything.
|
RobotsTxt(boolean disallowAll)
create empty instance allowing or forbidding everything.
|
RobotsTxt(byte[] serialized)
create instance from serialized version, as created by
asBinary() . |
RobotsTxt(java.lang.String... disallows)
create instance from given paths, used for tests.
|
RobotsTxt(java.lang.String userAgent,
java.io.InputStream stream)
create instance by reading "Disallow" entries from stream that apply to the given user-agent.
|
public RobotsTxt()
public RobotsTxt(boolean disallowAll)
public RobotsTxt(java.lang.String userAgent, java.io.InputStream stream) throws java.io.IOException
java.io.IOException
- error reading the streampublic RobotsTxt(byte[] serialized)
asBinary()
.public RobotsTxt(java.lang.String... disallows)
public boolean isAllowed(java.lang.String path)
path
- path portion or the URL to check.public byte[] asBinary()