input
stringlengths
10
828
output
stringlengths
5
107
public byte array encoder get byte array encoder throws jupload ioexception return this byte array encoder
return the current
public void display url string url boolean success throw new unsupported operation exception default jupload context display url
just throws a unsupported operation exception exception
public japplet get applet throw new unsupported operation exception default jupload context get applet
just throws a unsupported operation exception exception
public output stream get output stream return this
get the output stream where http data can be written
public cursor get cursor throw new unsupported operation exception default jupload context get cursor
just throws a unsupported operation exception exception
public string get parameter string key string def throw new unsupported operation exception default jupload context get parameter string string
just throws a unsupported operation exception exception
public pushback input stream get input stream return this input stream
get the input stream where http server response can be read
public int get parameter string key int def throw new unsupported operation exception default jupload context get parameter string int
just throws a unsupported operation exception exception
public string get key string ret this name if null this path ret this path return ret
retrieves the hash value of this cookie
public float get parameter string key float def throw new unsupported operation exception default jupload context get parameter string float
just throws a unsupported operation exception exception
public string get header string path int secure string buffer sb new string buffer if null this path this path equals this path starts with path this secure secure this max age system current time millis if this version 0 sb append version append this version append sb append this name append append this value append if null this path sb append path append this path append if null this domain sb append domain append this domain append else sb append this name append append this value append return sb to string
returns a single client cookie header element
public string get response body return this http input stream reader get response body
get the last response body
public void set domain string domain if domain starts with int dot domain index of if dot 0 domain domain substring dot this domain domain
sets the domain for this cookie jar
public long get parameter string key long def throw new unsupported operation exception default jupload context get parameter string long
just throws a unsupported operation exception exception
public string build cookie header url url string domain url get host int dot domain index of if dot 0 domain domain substring dot if domain equals this domain string path url get path int secure url get protocol equals ignore case https 1 0 string buffer sb new string buffer for string key this jar key set cookie c this jar get key if null c sb append c get header path secure if sb length 0 sb append r n return cookie sb to string return null
builds a rfc 2109 compliant client cookie header for the specified url
public string get response headers return this http input stream reader get response headers
get the headers of the http response
public boolean get parameter string key boolean def throw new unsupported operation exception default jupload context get parameter string boolean
just throws a unsupported operation exception exception
public string get response msg return this http input stream reader get response msg
get the last response message
public string normalize url string url throws jupload exception throw new unsupported operation exception default jupload context normalize url
just throws a unsupported operation exception exception
public void read cookie from navigator vector string headers throw new unsupported operation exception default jupload context read cookie from navigator
just throws a unsupported operation exception exception
private boolean is keep alive if this socket null return false else if this upload policy get allow http persistent return false else if this b chunk enabled this b last chunk this use proxy this upload policy get server protocol equals http 1 1 rfc 2086 section 19 7 1 return false else return true
indicates whether the current socket should be reused
public void read user agent from navigator vector string headers throw new unsupported operation exception default jupload context read user agent from navigator
just throws a unsupported operation exception exception
public int gethttp status code return this http status code
return the last read http response 200 in case of success
public cursor set cursor cursor cursor throw new unsupported operation exception default jupload context set cursor cursor
just throws a unsupported operation exception exception
public string get response body return this string response body
get the last response bytearray response body
public string get response charset return this charset
get the charset that should be used to decode the last response when
public void show status string status throw new unsupported operation exception default jupload context show status
just throws a unsupported operation exception exception
public string get response headers return this response headers
get the headers of the http response
public string get response msg return this response msg
get the last response message
public void after upload if this upload input stream null try this upload input stream close catch ioexception ioe let s ignore it this upload input stream null transmission to the real file data this file data after upload
clean any local resources then transmit to the encapsulated
public void before retry reset of our upload counter this upload remaining length this file data get upload length if this upload input stream null try this upload input stream close catch ioexception ioe let s ignore it this upload policy display debug warning ignoring ioe get class get name in upload file data before retry ioe get message 30 this upload input stream null
clean any local resources to allow retrying to upload this file
public string get response body return this response body
return the the body for the server response
public string get upload filename int index throws jupload exception return this upload policy get upload filename this file data index
retrieves the file name that should be used in the server application
public string get upload name int index throws jupload exception return this upload policy get upload name this file data index
retrieves the upload file name that should be sent to the server
public long get upload length return this file data get upload length
this methods stores locally the upload length
private void display stack trace throwable throwable if throwable null byte array output stream bs new byte array output stream print stream ps new print stream bs throwable print stack trace ps ps close display msg bs to string if there is a cause let s be sure its stack trace is displayed if throwable get cause null display msg caused by display stack trace throwable get cause
logs a stack trace for the given exception
private void set up string filename throws jupload exception this file new file this my file root filename this root new file this my file root system set property picture transmit metadata true this upload policy new picture upload policy this jupload context jupload context test helper this jupload context upload policy this upload policy this picture file data new picture file data this file this root picture upload policy this upload policy
lets construct a test case for the given filename
public void an unload method this unload has been executed true
this method is the entry point given to the
public void display err string error text exception exception display err error text exception 1
if debug is off the log window may not be visible
public boolean is upload stopped return false
always return false
public void on file selected file data file data default implementation no action
default implementation of the
private void execute upload throws exception this file upload manager thread start wait for thread to finish thread this file upload manager thread file upload manager thread
starts the upload and wait for the
private void create test data this upload file packet new upload file packet this upload policy this file data new file data test helper 1 assert assert true the file must be readable this file data can read this upload file data new upload file data this file data 0 this file upload manager thread this upload policy
this method creates or re creates all objects for the current instance
public void on file double clicked file data file data default implementation no action
default implementation of the
public int get file chooser icon from file content return this file chooser icon from file content
getter for file chooser icon from file content
public int get file chooser icon size return this file chooser icon size
getter for file chooser icon size
public void set file chooser icon size int file chooser icon size if file chooser icon size 0 throw new java lang illegal argument exception file chooser icon size must be more than 0 this file chooser icon size file chooser icon size
setter for file chooser icon size
protected void set specific headers string specific headers this specific headers specific headers if specific headers null let s add each header in specific headers to the headers list in specific headers each header is separated by the n string two characters then n not the n character the regexp to find the n string not the n character is n we then double each character string header array specific headers split n for int x 0 x header array length x add header header array x
set all specific headers defined in the specific headers applet parameter
private void display msg string tag string msg string message if this jupload context get log window null message tag msg system out println message else message this jupload context get log window display msg tag msg let s store all text in the debug logfile if this debug generate file add msg to debug log message
displays a message
public void after file dropped drop target drop event drop event default no action
default reaction after a successful drop operation no action
public jupload file chooser create file chooser return new jupload file chooser this
default implementation for
public icon file view get icon file file return null
returns null the default icon is used
public void set last exception jupload exception exception this last exception exception the log window may become visible if this jupload context get upload panel null this jupload context get upload panel show or hide log window
set the last exception
private void initialize this set size 629 424 this set content pane get jcontent pane
this method initializes this
private jcombo box get jcombo box if j combo box null j combo box new jcombo box new string pritty fiat porta correo argentino j combo box set bounds new rectangle 277 126 144 22 return j combo box
this method initializes j combo box
private jtext field get numero text field if numero text field null numero text field new jtext field numero text field set bounds new rectangle 276 82 91 22 return numero text field
this method initializes numero text field
private jscroll pane get jscroll pane if j scroll pane null j scroll pane new jscroll pane j scroll pane set bounds new rectangle 10 295 711 125 j scroll pane set viewport view get jtable return j scroll pane
this method initializes j scroll pane
private jcombo box get razon socialj combo box if razon socialj combo box null razon socialj combo box new jcombo box new string pritty fiat porta correo argentino razon socialj combo box set bounds new rectangle 226 107 180 22 return razon socialj combo box
this method initializes razon socialj combo box
private jtable get jtable if j table null modelo new default table model j table new jtable j table set model modelo modelo set data vector new object null null null null null new string n mero fecha de recepci n fecha de soluci n prevista puesto cantidad de empleados j table get column fecha de soluci n prevista set preferred width 150 return j table
this method initializes j table
private jcombo box get puestoj combo box if puestoj combo box null puestoj combo box new jcombo box new string encargado de personal auxiliar mec nico soldador enroscador puestoj combo box set bounds new rectangle 225 142 181 22 return puestoj combo box
this method initializes puestoj combo box
private jbutton get cancelarj button if cancelarj button null cancelarj button new jbutton cancelarj button set icon swing resource manager get icon buscar solicitud de rrhh class iconos button cancel 001 png cancelarj button set tool tip text cancelar cancelarj button set bounds new rectangle 607 439 54 35 return cancelarj button
this method initializes cancelarj button
private jscroll pane get jscroll pane if j scroll pane null j scroll pane new jscroll pane j scroll pane set bounds new rectangle 34 191 560 143 j scroll pane set viewport view get jtable return j scroll pane
this method initializes j scroll pane
private jtable get jtable if j table null j table new jtable modelo new default table model j table set model modelo modelo set data vector new object new string n solicitud raz n social puesto fecha solicitud cantidad return j table
this method initializes j table
private jbutton get aceptarj button if aceptarj button null aceptarj button new jbutton aceptarj button set icon swing resource manager get icon buscar solicitud de rrhh class iconos filefind 001 png aceptarj button set tool tip text atender solicitud de rrhh aceptarj button set bounds new rectangle 68 439 54 35 return aceptarj button
this method initializes aceptarj button
private jbutton get buscar button if buscar button null buscar button new jbutton buscar button set icon swing resource manager get icon buscar solicitud de rrhh class iconos viewmag 002 png buscar button set tool tip text consultar solicitudes buscar button set bounds new rectangle 346 241 65 35 return buscar button
this method initializes buscar button
private void initialize this set size 752 518 this set modal true this set title consultar solicitudes de rrhh this set content pane get jcontent pane
this method initializes this
private jtext field get peso text field if peso text field null peso text field new jtext field 4 peso text field add key listener numeric listener peso text field set bounds new rectangle 69 170 37 20 return peso text field
this method initializes j text field
private void initialize this set bounds new rectangle 0 0 780 570 add datos personales add otros datos add datos domiciliarios add datos contacto
this method initializes this
private jtext field get estatura text field if estatura text field null estatura text field new jtext field 4 estatura text field add key listener numeric listener estatura text field set bounds new rectangle 356 170 37 20 return estatura text field
this method initializes j text field1
private jtext field get remuneracion text field if remuneracion text field null remuneracion text field new jtext field remuneracion text field add key listener numeric listener remuneracion text field set bounds new rectangle 186 130 66 21 return remuneracion text field
this method initializes j text field2
private jtext area get observacione text area if observacione text area null observacione text area new jtext area observacione text area set background color white observacione text area set bounds new rectangle 117 210 332 84 return observacione text area
this method initializes j text area
private void initialize this set size 770 570 this set layout null this add get jsplit pane
this method initializes this
private jsplit pane get jsplit pane if j split pane null j split pane new jsplit pane j split pane set bounds new rectangle 762 613 0 0 j split pane set left component get jpanel j split pane set divider location 350 model new default table model model add column empresa model add column periodo model add column puesto return j split pane
this method initializes j split pane
protected boolean user says revert toolkit get default toolkit beep ftf select all object options editar revertir int answer joption pane show option dialog swing utilities get window ancestor ftf el valor del coeficiente debe ser un decimal entre minimum y maximum n puede ingresar el valor nuevamente o volver al ltimo valor ingresado valor de coeficiente no v lido joption pane yes no option joption pane error message null options options 1 if answer 1 revert ftf set value ftf get value return true return false
lets the user know that the text they entered is
private void initialize this set size 770 570
this method initializes this
public void show simple alert dialog string title string message simple alert dialog set message message simple alert dialog set title title simple alert dialog set cancelable true simple alert dialog set positive button ok on simple alert listener simple alert dialog show
show a custom alert dialog
public node point convert to xy string lat string lon float phi float gps radians float parse float lat float lambda float gps radians float parse float lon float q float 2 math sin math pi 2 phi 2 float x float float parse float lat map bounds d latitude canvas bounds height map bounds minlat float y float float parse float lon map bounds d longitude canvas bounds width map bounds minlon float x float q math sin lambda float y float q math cos lambda canvas bounds width return new node point x y
return a new node point according to equations of the lambert projection
public boolean is paused return is paused
queries paused state
private void probe for proxy if is trying return try is trying true enumeration network interface e network interface get network interfaces boolean up and not local false while e has more elements network interface n e next element if n is loopback n is up up and not local true break if up and not local fail connect google main show request dialog catch ioexception e if get network interfaces threw a exception there is no network finally is trying false
probe for a working network and show a input dialog
private boolean remove eldest entries return delegate size max entries
used to tell when no more entries are allowed
protected void cancel exception cause throws exception
cancel a link
public void set thread pool executor thread pool executor executor this executor executor
sets the executor this queue belongs to
private void un interruptiple put returnstate s while true try boolean is interrupted thread interrupted channel put s if is interrupted thread current thread interrupt return catch interrupted exception ex1 this should be cooperative
forbid a this thread to be interrupted while
private void ensure open throws ioexception if str null throw new ioexception stream closed
check to make sure that the stream has not been closed
public int read throws ioexception synchronized lock ensure open if next length return 1 return str char at next
reads a single character
public int read char cbuf int off int len throws ioexception synchronized lock ensure open if off 0 off cbuf length len 0 off len cbuf length off len 0 throw new index out of bounds exception else if len 0 return 0 if next length return 1 int n math min length next len str get chars next next n cbuf off next n return n
reads characters into a portion of an array
public long skip long ns throws ioexception synchronized lock ensure open if next length return 0 bound skip by beginning and end of the source long n math min length next ns n math max next n next n return n
skips the specified number of characters in the stream
public boolean ready throws ioexception synchronized lock ensure open return true
tells whether this stream is ready to be read
public void mark int read ahead limit throws ioexception if read ahead limit 0 throw new illegal argument exception read ahead limit 0 synchronized lock ensure open mark next
marks the present position in the stream
public boolean is empty return headers is empty
return if archive is empty
public void close str null
closes the stream and releases any system resources associated with
public int selected size return work set size
return the number of selected files
public int size return headers size
return the number of files in the archive
public void clear work set clear
clears the selected archives
public selector sub selector if work set size headers size work set clear return this else if work set is empty return new selector extractor collections empty list return new selector extractor new array list work set
creates a selector where the selected archives of the current selector
public selector inverse selector if work set is empty return this else if work set size headers size return new selector extractor collections empty list removing in arraylists is painfull linked list arr new linked list headers arr remove all work set return new selector extractor arr
creates a selector where the not selected archives of the current selector
public selector select all for object h headers work set add h return this
tries to reserve for extraction all files
public selector select by regex string regex if regex null return this name never null pattern p pattern compile regex matcher m p matcher for object h headers m reset extractor get file name h if m matches work set add h return this
tries to reserve for extraction all the files
public selector select by regex string regex int flags if regex null return this name never null pattern p pattern compile regex flags matcher m p matcher for object h headers m reset extractor get file name h if m matches work set add h return this
tries to reserve for extraction all the files
public selector select by suffix string suffix boolean case sensitive if suffix null return this archived name is never null if case sensitive for object h headers if extractor get file path h ends with suffix work set add h else for object h headers if extractor get file path h to lower case locale english ends with suffix to lower case locale english work set add h return this
tries to reserve for extraction all the files with the given suffix