From 7d4f18d0cb9bd6426a26e378dea13cb3aaae6b9d Mon Sep 17 00:00:00 2001 From: Anup Cowkur Date: Wed, 29 Jan 2014 12:02:02 +0530 Subject: [PATCH] Added programming language annotations in Github flavored markdown style in Readme. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8ace5d4..381f19a 100644 --- a/README.md +++ b/README.md @@ -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) { @@ -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) { @@ -40,7 +40,7 @@ Reservoir.putAsync("myKey", myObject, new ReservoirPutCallback() { synchronous put: -``` +```java try { Reservoir.put("myKey",myObject); } catch (Exception e) { @@ -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() { @Override public void onComplete(Exception e, MyClass myObject) { @@ -71,7 +71,7 @@ Reservoir.getAsync("myKey", MyClass.class, new ReservoirGetCallback() { synchronous get: -``` +```java try { Reservoir.get("myKey",MyClass.class); } catch (Exception e) { @@ -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) {} @@ -94,7 +94,7 @@ You can directly [download the jar](https://github.com/anupcowkur/Reservoir/rele If you use Maven: -``` +```xml com.github.anupcowkur resrvoir @@ -104,7 +104,7 @@ If you use Maven: or Gradle: -``` +```groovy compile 'com.github.anupcowkur:reservoir:1.0' ```