Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Added programming language annotations in Github flavored markdown st…
Browse files Browse the repository at this point in the history
…yle in Readme.
  • Loading branch information
Anup Cowkur committed Jan 29, 2014
1 parent abed852 commit 7d4f18d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Reservoir is a simple library for Android that allows you to easily serialize an
## Initialize
Reservoir uses the internal storage allocated to your app. Before you can do anything, you need to initialize Reservoir with the cache size.

```
```java
try {
Reservoir.init(this, 2048);
} catch (Exception e) {
Expand All @@ -26,7 +26,7 @@ You can put objects into Reservoir synchronously or asynchronously.

Async put will you give you a callback on completion:

```
```java
Reservoir.putAsync("myKey", myObject, new ReservoirPutCallback() {
@Override
public void onComplete(Exception e) {
Expand All @@ -40,7 +40,7 @@ Reservoir.putAsync("myKey", myObject, new ReservoirPutCallback() {

synchronous put:

```
```java
try {
Reservoir.put("myKey",myObject);
} catch (Exception e) {
Expand All @@ -56,7 +56,7 @@ You can get stuff out of Reservoir synchronously or asynchronously as well.

Async get will give you a callback on completion:

```
```java
Reservoir.getAsync("myKey", MyClass.class, new ReservoirGetCallback<MyClass>() {
@Override
public void onComplete(Exception e, MyClass myObject) {
Expand All @@ -71,7 +71,7 @@ Reservoir.getAsync("myKey", MyClass.class, new ReservoirGetCallback<MyClass>() {

synchronous get:

```
```java
try {
Reservoir.get("myKey",MyClass.class);
} catch (Exception e) {
Expand All @@ -83,7 +83,7 @@ try {

If you wish to know whether an object exists for the given key, you can use:

```
```java
try {
boolean objectExists = Reservoir.contains("myKey");
} catch (Exception e) {}
Expand All @@ -94,7 +94,7 @@ You can directly [download the jar](https://github.com/anupcowkur/Reservoir/rele

If you use Maven:

```
```xml
<dependency>
<groupId>com.github.anupcowkur</groupId>
<artifactId>resrvoir</artifactId>
Expand All @@ -104,7 +104,7 @@ If you use Maven:

or Gradle:

```
```groovy
compile 'com.github.anupcowkur:reservoir:1.0'
```

Expand Down

0 comments on commit 7d4f18d

Please sign in to comment.