JSJaC

## Class JSJaCCookie

    Object
       |
       +--JSJaCCookie

class JSJaCCookie

Class representing browser cookies for storing small amounts of data
Defined in JSJaCCookie.js

Field Summary
`string` | `domain` The cookie's domain
`String` | `name` This cookie's name
`string` | `path` The cookie's path
`int` | `secs` Time in seconds when cookie expires (thus being delete by browser).
`String` | `value` This cookie's value

Constructor Summary
`JSJaCCookie(<String> name,<String> value,<int> secs,<String> domain,<String> path)` Creates a new Cookie

Method Summary
`void` | `erase()` Deletes this cookie
`String` | `getName()` Gets the name of this cookie
`String` | `getValue()` Gets the value of this cookie
`Cookie` | `setDomain(<String> domain)` Sets the domain of this cookie
`Cookie` | `setName(<String> name)` Sets the name of this cookie
`Cookie` | `setPath(<String> path)` Sets the path of this cookie
`Cookie` | `setValue(<String> value)` Sets the value of this cookie
`void` | `write()` Stores this cookie
`<static> String` | `get(<String> name)` Reads the value for given `name` from cookies and returns its valued new
`<static> Cookie` | `read(<String> name)` Reads the value for given `name` from cookies and return new `Cookie` object
`<static> void` | `remove(<String> name)` Deletes cookie with given `name`

Field Detail

### domain

    string domain

The cookie's domain

### name

    String name

This cookie's name

### path

    string path

The cookie's path

### secs

    int secs

Time in seconds when cookie expires (thus being delete by browser). A value of -1 denotes a session cookie which means that stored data gets lost when browser is being closed.

### value

    String value

This cookie's value

Constructor Detail

### JSJaCCookie

    JSJaCCookie(<String> name,<String> value,<int> secs,<String> domain,<String> path)

Creates a new Cookie

Parameters:

`name` - The name of the value to store

`value` - The value to store

`secs` - Number of seconds until cookie expires (may be empty)

`domain` - The domain for the cookie

`path` - The path of cookie

Method Detail

### erase

    void erase()

Deletes this cookie

### getName

    String getName()

Gets the name of this cookie

Returns:

The name

### getValue

    String getValue()

Gets the value of this cookie

Returns:

The value

### setDomain

    Cookie setDomain(<String> domain)

Sets the domain of this cookie

Parameters:

`domain` - The value for the domain of the cookie

Returns:

This cookie

### setName

    Cookie setName(<String> name)

Sets the name of this cookie

Parameters:

`name` - The name for this cookie

Returns:

This cookie

### setPath

    Cookie setPath(<String> path)

Sets the path of this cookie

Parameters:

`path` - The value of the path of the cookie

Returns:

This cookie

### setValue

    Cookie setValue(<String> value)

Sets the value of this cookie

Parameters:

`value` - The value for this cookie

Returns:

This cookie

### write

    void write()

Stores this cookie

### get

    <static> String get(<String> name)

Reads the value for given `name` from cookies and returns its valued new

Parameters:

`name` - The name of the cookie to read

Returns:

The value of the cookie read

Throws:

- CookieException when cookie with given name could not be found

### read

    <static> Cookie read(<String> name)

Reads the value for given `name` from cookies and return new `Cookie` object

Parameters:

`name` - The name of the cookie to read

Returns:

A cookie object of the given name

Throws:

- CookieException when cookie with given name could not be found

### remove

    <static> void remove(<String> name)

Deletes cookie with given `name`

Parameters:

`name` - The name of the cookie to delete

Throws:

- CookieException when cookie with given name could not be found

JSJaC

Documentation generated by JSDoc on Tue Jan 5 02:48:26 2021