Android Open Source - hoot Hoot Deserializer






From Project

Back to project page hoot.

License

The source code is released under:

Apache License

If you think the Android project hoot listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright (C) 2012 Two Toasters, LLC/* w ww  .  java2s. c o  m*/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.twotoasters.android.hoot;

import java.io.InputStream;

public abstract class HootDeserializer<T> {

    public HootDeserializer(boolean isStreamDeserializer) {
        mIsStreamDeserializer = isStreamDeserializer;
    }

    public T deserialize(String string) {
        return null;
    }

    public T deserialize(InputStream stream) {
        return null;
    }

    public boolean isStreamDeserializer() {
        return mIsStreamDeserializer;
    }

    // -------------------------------------------------------------------------
    // End of public interface
    // -------------------------------------------------------------------------
    private T mDeserializedStorage;
    private boolean mIsStreamDeserializer;

    public T getDeserializedResult() {
        return mDeserializedStorage;
    }

    T performDeserialize(InputStream responseStream) {
        mDeserializedStorage = deserialize(responseStream);
        return mDeserializedStorage;
    }

    T performDeserialize(String responseString) {
        mDeserializedStorage = deserialize(responseString);
        return mDeserializedStorage;
    }

}




Java Source Code List

com.twotoasters.android.hoot.HootDeserializer.java
com.twotoasters.android.hoot.HootGlobalDeserializer.java
com.twotoasters.android.hoot.HootRequest.java
com.twotoasters.android.hoot.HootResult.java
com.twotoasters.android.hoot.HootTask.java
com.twotoasters.android.hoot.HootThreadPoolAsyncTask.java
com.twotoasters.android.hoot.HootTransportHttpClient.java
com.twotoasters.android.hoot.HootTransportHttpUrlConnection.java
com.twotoasters.android.hoot.HootTransport.java
com.twotoasters.android.hoot.Hoot.java
com.twotoasters.android.hoot.activity.HootActivityHelper.java
com.twotoasters.android.hoot.activity.HootBaseActivity.java