-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update on #229 * Update on #229 Added rebuild from chunks * Added license header * Fixed some part * Update on #229 Improved - Added BAse64 decoding * Some more changes in hope of fix * Update on #229 Final Fix * Update on #229 Removed Unused imports
- Loading branch information
1 parent
249575b
commit 8e57199
Showing
6 changed files
with
350 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
mobile/src/main/java/org/hawkular/client/android/backend/model/Data.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright 2015-2017 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* 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 org.hawkular.client.android.backend.model; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
public class Data implements Parcelable | ||
{ | ||
|
||
private Long timestamp; | ||
private String value; | ||
private Tags tags; | ||
public final static Creator<Data> CREATOR = new Creator<Data>() { | ||
|
||
|
||
@SuppressWarnings({ | ||
"unchecked" | ||
}) | ||
public Data createFromParcel(Parcel in) { | ||
Data instance = new Data(); | ||
instance.timestamp = ((Long) in.readValue((Integer.class.getClassLoader()))); | ||
instance.value = ((String) in.readValue((String.class.getClassLoader()))); | ||
instance.tags = ((Tags) in.readValue((Tags.class.getClassLoader()))); | ||
return instance; | ||
} | ||
|
||
public Data[] newArray(int size) { | ||
return (new Data[size]); | ||
} | ||
|
||
} | ||
; | ||
|
||
public Long getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
public void setTimestamp(Long timestamp) { | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
public Tags getTags() { | ||
return tags; | ||
} | ||
|
||
public void setTags(Tags tags) { | ||
this.tags = tags; | ||
} | ||
|
||
public void writeToParcel(Parcel dest, int flags) { | ||
dest.writeValue(timestamp); | ||
dest.writeValue(value); | ||
dest.writeValue(tags); | ||
} | ||
|
||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
mobile/src/main/java/org/hawkular/client/android/backend/model/Tags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright 2015-2017 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* 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 org.hawkular.client.android.backend.model; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
import android.os.Parcelable.Creator; | ||
|
||
public class Tags implements Parcelable | ||
{ | ||
|
||
private String chunks; | ||
private String size; | ||
public final static Creator<Tags> CREATOR = new Creator<Tags>() { | ||
|
||
|
||
@SuppressWarnings({ | ||
"unchecked" | ||
}) | ||
public Tags createFromParcel(Parcel in) { | ||
Tags instance = new Tags(); | ||
instance.chunks = ((String) in.readValue((String.class.getClassLoader()))); | ||
instance.size = ((String) in.readValue((String.class.getClassLoader()))); | ||
return instance; | ||
} | ||
|
||
public Tags[] newArray(int size) { | ||
return (new Tags[size]); | ||
} | ||
|
||
} | ||
; | ||
|
||
public String getChunks() { | ||
return chunks; | ||
} | ||
|
||
public void setChunks(String chunks) { | ||
this.chunks = chunks; | ||
} | ||
|
||
public String getSize() { | ||
return size; | ||
} | ||
|
||
public void setSize(String size) { | ||
this.size = size; | ||
} | ||
|
||
public void writeToParcel(Parcel dest, int flags) { | ||
dest.writeValue(chunks); | ||
dest.writeValue(size); | ||
} | ||
|
||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
} |
Oops, something went wrong.