input
stringlengths
10
828
output
stringlengths
5
107
public void set last activity date value last activity value
set the last activity property
public void set input stream input stream value input stream value
set the input stream property
public void set redirect url string value redirect url value
set the redirect url property
public void set cache ok boolean value cache ok value
set the cache ok property
public boolean get cache ok return cache ok
get the cache ok property
public void set response code int value response code value
set the response code property
public void init harvesters throws exception if we are in read only mode then don t start the harvesters if get repository is read only return misc run this init harvesters in thread
this starts up the harvesters in a thread
public void set http header args list string value http header args value
set the http header args property
public void set bottom html string value bottom html value
set the bottom html property
public string get bottom html return bottom html
get the bottom html property
public void set authorization method authorization method value this authorization method value
set the authorization method property
public authorization method get authorization method return this authorization method
get the authorization method property
public void set last modified date value this last modified value
set the last modified property
public file input stream get file input stream file file throws exception check read file file return new file input stream file
this creates a file output stream
public void set base group id string value base group id value
set the base group id property
public string get base group id return base group id
get the base group id property
public void set properties hashtable value properties value
set the properties property
public double get lat or lon value string from double dflt if defined from return dflt string ll string string get string from trim if ll string null ll string length 0 return dflt return misc decode lat lon ll string
get the value for a latitude or longitude property
public void set monitor boolean value monitor value
set the monitor property
public boolean get monitor return monitor
get the monitor property
public void set add metadata boolean value add metadata value
set the add metadata property
public boolean get add metadata return add metadata
get the add metadata property
public void set add short metadata boolean value add short metadata value
set the add metadata property
public boolean get add short metadata return add short metadata
get the add metadata property
public void set sleep minutes double value sleep minutes value
set the sleep minutes property
public string get request path return type
get the type property
public double get sleep minutes return sleep minutes
get the sleep minutes property
public void set http header args hashtable value http header args value todo be smarter about this string ua get user agent to lower case is mobile ua index of iphone 0 ua index of android 0 ua index of blackberry 0
set the http header args property
public hashtable get http header args return http header args
get the http header args property
public void set is editable boolean value is editable value
set the is editable property
public void set session id string value session id value session id was set true
set the session id property
public void set active on start boolean value active on start value
set the active on start property
public boolean get active on start return active on start
get the active on start property
public void set test mode boolean value test mode value
set the test mode property
public boolean get test mode return test mode
get the test mode property
public void set test count int value test count value
set the test count property
public string get ip if ip null repository null return repository get ip address return ip
get the ip property
public string get string int length string s ascii funcs ascii string input offset length offset length number length length return s
get a string
public void write string s int start int len throws ioexception do not worry about buffering this specially since the strings may be of differing lengths for int i 0 i s length i 1 write bytes s i
write a segment of an array of strings
public void set left message string value left message value
set the left message property
public string get left message return left message
get the left message property
public int read primitive array object o throws ioexception note that we assume that only a single thread is doing a primitive array read at any given time otherwise primitive array count can be wrong and also the input data can be mixed up primitive array count 0 return int read larray o
this routine provides efficient reading of arrays of any primitive type
public void set protocol string value protocol value
set the protocol property
public void set secure boolean value secure value
set the secure property
public void set checking auth method boolean value this checking auth method value
set the checking auth method property
public boolean get checking auth method return this checking auth method
get the checking auth method property
public int read long l int start int len throws ioexception int i start try for i start len i 1 if count pos 8 fill buf 8 int i1 buf pos 24 buf pos 1 0x ff 16 buf pos 2 0x ff 8 buf pos 3 0x ff int i2 buf pos 4 24 buf pos 5 0x ff 16 buf pos 6 0x ff 8 buf pos 7 0x ff l i long i1 32 long i2 0x00000000 ffffffffl pos 8 catch eofexception e return eof check e i start 8 return 8 len
read a long array
public void set api method api method value this api method value
set the api method property
public api method get api method return this api method
get the api method property
public int format string val byte array int off int len if val null for int i 0 i len i 1 array off i byte return off len int slen val length if truncate on overflow slen len slen array length off val val substring 0 len slen len if align len slen off align fill array off len slen we should probably require ascii here but for the nonce we do not tam 5 11 system arraycopy val get bytes 0 array off slen return off slen
insert a string into an existing character array
public void set html template id string value html template id value
set the html template id property
public string get html template id if html template id null return html template id return get string arg template
get the html template id property
public void set page style page style value page style value
set the page style property
public page style get page style entry entry if page style null page style repository do make page style this entry return page style
get the page style property
public object get column string col name throws fits exception return get column find column col name
get a specific column of the table where
public object get column int col throws fits exception return table get column col
get a specific column from the table using 0 based column
public object get element int row int col throws fits exception return table get element row col
get a specific element of the table using 0 based indices
public void set row int row object new row throws fits exception table set row row new row
update a row within a table
public void set column string col name object new col throws fits exception set column find column col name new col
update a column within a table
public void set column int col object new col throws fits exception table set column col new col
update a column within a table
public void set element int row int col object element throws fits exception table set element row col element
update a single element within the table
public int add row object new row throws fits exception int row table add row new row my header add value naxis2 row ntf tablehdu naxis2 1 return row
add a row to the end of the table
public int find column string col name for int i 0 i get ncols i 1 string val my header get string value ttype i 1 if val null val trim equals col name return i return 1
find the 0 based column index corresponding to a particular
public string get column meta int index string type return my header get string value type index 1
convenience method for getting column data
public object get flattened column int col throws fits exception if table null get data if valid column col throw new fits exception invalid column object res table get column col return column to array col res n row
get a column in flattened format
public void set current column int col set current column col true
set the cursor in the header to point after the
public void set current column int col boolean after if after my header position after index tform col 1 else string tform tform col 1 my header find card tform
set the cursor in the header to point either before the
public void set null string int col string new null my header position after index tbcol col 1 try my header add value tnull col 1 new null ntf asciitablehdu tnull n 1 catch header card exception e system err println impossible exception in set null string e data set null string col new null
set the null string for a column
public int add row object o throws fits exception if table null get data if n col 0 n row 0 for int i 0 i o length i 1 add column o else object flat row new object get ncols for int i 0 i get ncols i 1 object x array funcs flatten o i flat row i array to column i x try table add row flat row catch table exception e throw new fits exception error add row to table n row 1 return n row
add a row at the end of the table
protected void fill header header head try head set xtension unknown head set bitpix 8 head set naxes 1 head add value naxis1 byte size ntf undefineddata naxis1 1 head add value pcount 0 ntf undefineddata pcount 1 head add value gcount 1 ntf undefineddata gcount 1 head add value extend true ntf undefineddata extend 1 just in case catch header card exception e system err println unable to create unknown header e
fill header with keywords that describe data
private boolean is varying object o if o null return false string classname o get class get name if classname length 3 classname char at 0 classname char at 1 return false object ox object o if ox length 2 return false int flen array get length ox 0 for int i 1 i ox length i 1 if array get length ox i flen return true return false
is this a variable length column
public void write array data output str throws fits exception try str write array data array fits util pad str get true size catch ioexception e throw new fits exception io error writing random groups data e
write the random groups data
public long get original size return fits util add padding original card count 80
get the size of the original header in bytes
public void reset original size original card count cards size
indicate that we can use the current internal size of the
public string get trimmed string string keyword string s my header get string value keyword if s null s s trim return s
get the string value associated with code keyword code
protected void stream init input stream str throws fits exception str fits util decompress str if str instanceof array data input data str array data input str else use efficient blocking for input data str new buffered data input stream str
initialize the input stream
protected void file init file my file boolean compressed throws fits exception try if compressed file input stream str new file input stream my file stream init str else random init my file catch ioexception e throw new fits exception unable to create input stream from file my file
get a stream from the file and then use the stream initialization
public string get origin return get trimmed string origin
get the name of the organization which created this fits file
public basic hdu read hdu throws fits exception ioexception if data str null at eof return null if data str instanceof nom tam util random access last file offset 0 fits util reposition data str last file offset header hdr header read header data str if hdr null at eof true return null data datum hdr make data try datum read data str catch padding exception e e update header hdr throw e last file offset fits util find offset data str basic hdu next hdu fits factory hdufactory hdr datum hdu list add element next hdu return next hdu
read the next hdu on the default input stream
public string get object return get trimmed string object
get the name of the observed object in this fits file
public string get author return get trimmed string author
return the name of the person who compiled the information in
public string get reference return get trimmed string referenc
return the citation of a reference where the data associated with
public double get maximum value return my header get double value datamax
return the minimum valid value in the array
public double get minimum value return my header get double value datamin
return the minimum valid value in the array
public boolean reset return my header reset
reset the input stream to the beginning of the hdu i
protected void read heap array data input input throws fits exception fits util reposition input file offset n row row len heap offset heap read input heap read from stream true
read the heap which contains the data for variable length
public boolean had duplicates return duplicates null
were duplicate header keys found when this record was read in
public void write array data output dos throws fits exception file offset fits util find offset dos ensure that all cards are in the proper order cards sort new header order check beginning check end if cards size 0 return cursor iter cards iterator 0 try while iter has next header card card header card iter next byte b ascii funcs get bytes card to string dos write b fits util pad dos get number of cards 80 byte catch ioexception e throw new fits exception io error writing header e try dos flush catch ioexception e
write the current header including any needed padding to the
public array data input get stream return data str
get the data stream used for the fits data
public boolean reset try fits util reposition input file offset return true catch exception e return false
reset the file pointer to the beginning of the header
public boolean rewriteable if file offset 0 input instanceof array data output cards size 35 36 original card count 35 36 return true else return false
can the header be rewritten without rewriting the entire file
public void update after delete int old ncol header hdr throws fits exception hdr add value naxis1 row len ntf binarytable naxis1 1
update the header after a deletion
public void write string message system err println message new illegal argument exception print stack trace chat applet write gfx message
write the message or messages to the server
public text canvas make text canvas text canvas ct new text canvas this get my user ct set background get property chattext bgcolor color white ct line1color get property chattext line1color color null ct line2color get property chattext line2color color null return ct
create the gui
public void write string command name string attributes write make command tag command name attributes
create the whiteboard command with the given command name
public void write create glyph the glyph boolean check if sent have we already sent it if check if sent glyph create sent get the glyph get id null return glyph create sent put the glyph get id the glyph get id write cmd create xml node attr attr id the glyph get id xml node attr attr type the glyph get type the glyph get create string
write the glyph create command to the server
public void share glyphs for int i 0 i glyphs size i write create glyph glyphs element at i false
go through all of the glyph s and send the create command
public void paint inner graphics g super paint inner g if cursor null g set color color gray if cursor down down cursor null g draw image down cursor cursor x cursor y null null else if up cursor null g draw image up cursor cursor x cursor y null null
paint this canvas
public void notify glyphs changed vector glyphs string message for int i 0 i glyphs size i glyph the glyph glyph glyphs element at i todo
sometime we should do bulk message sends
public void notify glyph change done glyph the glyph string attr notify glyph change done the glyph attr false
tell other whiteboards that the glyph has changed