input
stringlengths
10
828
output
stringlengths
5
107
public void set creation date calendar date throws ioexception get document information set creation date date
p sets the creation date in the document information
public void set creator string creator throws ioexception get document information set creator creator
p sets the creator in the document information
public void set keywords string keywords throws ioexception get document information set keywords keywords
p sets the keywords in the document information
public node get tag string tag node list nlist doc get elements by tag name tag if nlist get length 0 return null else return nlist item 0
return the node object of a certain tag or null if none found
public string get tag text string tag return get text get tag tag
returns the text value of a node specified by string
public string get attr text string tag string attribute node node get tag tag if node null return else return get node attr text node attribute
find the value of a given attribute of a node specified by name
public node list get node list string tag return doc get elements by tag name tag
return a list of all nodes of this tag
public boolean has tag string tag return doc get elements by tag name tag get length 0
returns true if the tag is present in the document somewhere
public void set modification date calendar date throws ioexception get document information set modification date date
p sets the modification date in the document information
private boolean err string msg logger error msg if socket null try socket close catch ioexception e no action socket null return false
log error close socket if necessary return false
private void send string msg wrtr print msg r n wrtr flush
helper function to add network eol to each string and
public void set producer string producer throws ioexception get document information set producer producer
p sets the producer in the document information
synchronized public void fill state true this notify all
fill the semaphore
public boolean is full return state
return true iff the sempahore is full
public void set subject string subject throws ioexception get document information set subject subject
p sets the subject in the document information
public void handle message logger log int msg level string message open or reopen stream log super handle message log msg level message max size math max max size logfile length
write the message to the file reopening it first if its time
public void set title string title throws ioexception get document information set title title
p sets the title in the document information
public rate limiter get rate limiter object key return get rate limiter key config manager get current config
return the rate limiter associated with the key creating one if it
public rate limiter get rate limiter object key configuration config rate limiter limiter synchronized this limiter this get key if limiter null limiter rate limiter get configured rate limiter config null param name dfault this put key limiter return limiter
return the rate limiter associated with the key creating one if it
public int get pid throws unsupported exception throw new unsupported exception no os independent way to find pid
return the pid of the executing process if possible
public void reset rate limiters reset rate limiters config manager get current config
reset the parameters of all the rate limiters in the map according
public int get main pid throws unsupported exception throw new unsupported exception no os independent way to find main pid
return the pid of the top process of this jvm if possible
public void reset rate limiters configuration config synchronized this for map entry object rate limiter entry this entry set rate limiter limiter entry get value rate limiter new limiter rate limiter get configured rate limiter config limiter param name dfault if new limiter limiter entry set value new limiter
reset the parameters of all the rate limiters in the map according
public pdrectangle find crop box return get pd page find crop box
p finds this pages crop box looking up hierarchically
public pdrectangle find media box return get pd page find media box
p finds this pages media box looking up hierarchically
public boolean is case sensitive file system return true
determines whether file system is case sensitive for operations that
public pdresources find resources return get pd page find resources
p finds this pages resources looking up hierarchically
public pdrectangle get art box return get pd page get art box
p gets this pages art box by default the crop box
public pdrectangle get bleed box return get pd page get bleed box
p gets this pages bleed box by default the crop box
public cosstream get content stream throws ioexception return get contents get stream
p gets the
public pdrectangle get crop box return get pd page get crop box
p gets this pages crop box em without em looking up
public boolean has scripting support return true
return true if the platform includes scripting support
public cosdictionary get dictionary return get pd page get cosdictionary
p gets this pages underlying dictionary
public int get compatibility mode return compatibility mode
p returns the current mode for this serializer
public pdrectangle get media box return get pd page get media box
p gets this pages media box em without em looking up
public void set compatibility mode int mode switch mode case castor mode case xstream mode case xstream overwrite mode this compatibility mode mode break default string error string attempt to set cxserializer mode to mode logger error error string throw new illegal argument exception error string
p sets the current mode for this serializer
public pdf document get pdf document return pdf document
p provides access to the
public boolean is disk full error ioexception e return string util index of ignore case e get message no space left on device 0
return true if the exception was caused by a full filesystem
public pdpage get pd page return pd page
p provides access to the underlying
public list iterator get stream token iterator throws ioexception return get stream tokens list iterator
p convenience method to obtain a list iterator over the
public list get stream tokens throws ioexception return get content stream get stream tokens
p gets the list of tokens in this pages content stream
public pdrectangle get trim box return get pd page get trim box
p gets this pages trim box by default the crop box
public void set art box pdrectangle rectangle get pd page set art box rectangle
p sets the art box for this page
public void set bleed box pdrectangle rectangle get pd page set bleed box rectangle
p sets the bleed box for this page
public void set crop box pdrectangle rectangle get pd page set crop box rectangle
p sets the crop box for this page
public void set media box pdrectangle rectangle get pd page set media box rectangle
p sets the media box for this page
public void set trim box pdrectangle rectangle get pd page set trim box rectangle
p sets the trim box for this page
protected pdstream get contents throws ioexception return get pd page get contents
p gets this pages content stream
private boolean in manifest string entry name manifest manifest return manifest get attributes entry name null manifest get attributes entry name null manifest get attributes entry name null
check to see if the entry name exists in the manifest
public void allow expired boolean b m allow expired b
if set true accept otherwise valid certificates that are expired
public boolean update file atomically file updated file target try return updated rename to target default catch security exception se just log and rethrow log warning security exception reported in atomic update se throw se
p attempts to update code target code atomically by renaming
static public string get range start string range if range null return null int i find range hyphen range return i 0 range substring 0 i trim range trim
get the range start
public int get pid throws unsupported exception return get proc pid
get pid of current process
public int get main pid throws unsupported exception string pid string ppid self int flags do vector v get proc stats ppid pid string v element at stat offset pid ppid string v element at stat offset ppid flags get int v stat offset flags log debug get main pid pid pid ppid ppid flags 0x integer to hex string flags while flags pf forknoexec 0 return integer parse int pid
get pid of main java process
static public string get range end string range if range null return null int i find range hyphen range return i 0 range substring i 1 trim range trim
get the range end
private int get proc pid throws unsupported exception vector v get my proc stats string pid string v element at stat offset pid return integer parse int pid
get pid from linux proc self stat
static public boolean range includes string range string value if range null value null return false int i find range hyphen range string start range i 0 range substring 0 i trim range trim string end range i 0 range substring i 1 trim range trim return range includes start range end range value
determine whether a range includes a given value
public static class manager extends base lockss daemon manager public void start service super start service get daemon get status service register status accessor timer q new status singleton public void stop service get daemon get status service unregister status accessor timer q super stop service
a little manager class just to register a status accessor
public vector get proc stats string pid throws unsupported exception string filename proc pid stat try reader r new file reader new file filename string s string util from reader r vector v string util break at s return v catch file not found exception e throw new unsupported exception can t open filename e catch ioexception e throw new unsupported exception error reading filename e
get stat vector for specified process from proc n stat
public void handle message logger log int msg level string message string buffer sb new string buffer sb append df format new date if time base is simulated sb append sim sb append time base now ms sb append sb append sb append logger name of msg level sb append sb append message write msg sb to string
write the message to the ant task
static public boolean range includes string start range string end range string value try see if value is within range int srange number util parse int start range int erange number util parse int end range int ival number util parse int value return ival srange ival erange catch number format exception ex can t compare numerically so compare as topic ranges return value compare to start range 0 value compare to end range 0 value starts with end range
determine whether a range includes a given value
private boolean is in list addr ip mask list for int i 0 i list length i if list i match ip return true return false
search for matching element in filter list
public class get target class return target class
p retrieves this instances target class
public boolean is ip allowed addr ip if incl filters null return false if is in list ip incl filters return false if is in list ip excl filters return false return true
return true if addr instance is allowed by filters
public mapping get target mapping return target mapping
p retrieves this instances target mapping
public int get main pid throws unsupported exception tk not sure how to find top process on open bsd this is right for green threads only return get proc pid
get pid of main java process
public interface addr extends mask
an ip address
public boolean equals object obj if obj instanceof mask4 mask4 ip mask4 obj return addr ip addr mask ip mask return false
return true if obj equal this
public object put object key object value long interval return put key value deadline in interval
add an antry that will expire in interval milliseconds
public object put object key object value deadline deadline remove expired entries if contains key key remove key from deadline keys key keytimes put key deadline list keys list deadline keys get deadline if keys null keys new array list 4 deadline keys put deadline keys keys add key return entries put key value
add an antry that will expire at the deadline
public int get mask bits return mask bits
return number of one bits in mask
public string to string string builder sb new string builder 19 for int i 24 i 0 i 8 sb append integer to string addr i 0xff if i 0 sb append if mask 1 sb append sb append integer to string mask bits return sb to string
return string representation
public vector get proc stats string pid throws unsupported exception string filename proc pid status try reader r new file reader new file filename string s string util from reader r vector v string util break at s return v catch file not found exception e throw new unsupported exception can t open filename e catch ioexception e throw new unsupported exception error reading filename e
get stat vector for specified process from proc n status
public boolean equals object obj if obj instanceof mask6 mask6 other mask6 obj return mask bits other mask bits inet equals other inet return false
return true if obj equal this
public string to string string builder sb new string builder 19 sb append inet get host address if mask bits 128 sb append sb append integer to string mask bits return sb to string
return string representation
public void set level int level if this level level info changing log level to name of level this level level
set minimum severity level logged by this log
public int get main pid throws unsupported exception throw new unsupported exception don t know how to get pid on solaris
get pid of main java process
public void set level string level name set level level of level name
set minimum severity level logged by this log
static public string to unaccented string s return combining diacrit pat matcher normalizer normalize s form nfd replace all
normalize string by removing diacritical marks
public boolean is case sensitive file system return false mac os fs is not case sensitive
determines whether file system is case sensitive for operations that
public boolean is debug return is level level debug
common case of code is level code
public boolean is debug1 return is level level debug1
common case of code is level code
public boolean is debug2 return is level level debug2
common case of code is level code
public int get main pid throws unsupported exception return get pid
get pid of main java process
public boolean is debug3 return is level level debug3
common case of code is level code
public boolean is level string level return this level level of level
return true if this log is logging at or above specified level
public boolean is case sensitive file system return false windows fs is not case sensitive
determines whether file system is case sensitive for operations that
public void log int level string msg throwable e if is level level string buffer sb new string buffer if id thread sb append get thread id thread current thread sb append sb append name sb append sb append msg if e null to string sometimes contains more info than get message string emsg e to string sb append sb append emsg if level param stack trace severity is level param stack trace level sb append n sb append string util trim stack trace emsg string util stack trace string e write msg level sb to string
log a message with the specified log level
public void log int level string msg log level msg null
log a message with the specified log level
public reader get reader return in
return the underlying reader
protected void threshold reached throws ioexception temp file create temp file temp name file output stream fos new file output stream temp file memory output stream write to fos current output stream fos memory output stream null
switches the underlying output stream from a memory based stream to
public file get file return temp file
returns the same output file specified in the constructor even when
public void delete temp file throws ioexception if temp file null if closed close file utils delete quietly temp file temp file null
delete the temp file if it exists closes the stream first if its
public deadline within of double stddev long mean duration super mean duration long stddev get random next gaussian
return a timer whose duration is a random normally distrubuted value
public long minus deadline other return expiration get time other get expiration time
return the number of milliseconds by which this deadline exceeds the
public date get expiration return expiration
return the expiration time as a date
public void critical string msg throwable e log level critical msg e
log a critical message with an exception backtrace
public void expire synchronized this expiration set time 0 changed
cause the deadline to expire immediately
public void expire at long millis synchronized this expiration set time millis duration millis now ms changed
change expiration time to time n
public void expire in long millis synchronized this expiration set time now ms millis duration millis changed
change expiration time to n milliseconds from now