// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.communication.messages.files; import android.os.Parcel; import android.os.Parcelable; import com.olio.communication.bluetooth.channel_messages.ControlWriteable; import com.olio.communication.messages.MessagePayload; import com.olio.util.ALog; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; public class ChunkRequest extends MessagePayload implements Serializable, Parcelable, ControlWriteable { public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { public MessagePayload createFromParcel(Parcel parcel) { return MessagePayload.unpackParcel(parcel); } public volatile Object createFromParcel(Parcel parcel) { return createFromParcel(parcel); } public MessagePayload[] newArray(int i) { return new ChunkRequest[i]; } public volatile Object[] newArray(int i) { return newArray(i); } }; private static final long serialVersionUID = 6L; private String mFileIdentifier; private String mFileSource; private int mRequestedStartingByte; public ChunkRequest() { } public byte[] controlBytes() { ByteBuffer bytebuffer; bytebuffer = ByteBuffer.allocate(20).order(ByteOrder.LITTLE_ENDIAN); bytebuffer.put((byte)1); bytebuffer.put((byte)mFileIdentifier.length()); bytebuffer.put(mFileIdentifier.getBytes("UTF-8")); _L2: bytebuffer.putInt(mRequestedStartingByte); return bytebuffer.array(); UnsupportedEncodingException unsupportedencodingexception; unsupportedencodingexception; ALog.e("Couldn't find UTF-8 Encoding.", unsupportedencodingexception, new Object[0]); if (true) goto _L2; else goto _L1 _L1: BufferOverflowException bufferoverflowexception; bufferoverflowexception; ALog.e("Unable to send file with identifier length greater than 14", new Object[0]); return null; } public boolean equals(Object obj) { if (obj != null) { if (obj == this) { return true; } if (obj.getClass() == getClass()) { ChunkRequest chunkrequest = (ChunkRequest)obj; return (new EqualsBuilder()).appendSuper(super.equals(obj)).append(mFileIdentifier, chunkrequest.mFileIdentifier).append(mRequestedStartingByte, chunkrequest.mRequestedStartingByte).append(mFileSource, chunkrequest.getFileSource()).isEquals(); } } return false; } public String getFileIdentifier() { return mFileIdentifier; } public String getFileSource() { return mFileSource; } public int getRequestedStartingByte() { return mRequestedStartingByte; } public int hashCode() { return (new HashCodeBuilder(3, 97)).append(mFileIdentifier).append(mRequestedStartingByte).append(mFileSource).toHashCode(); } public void setFileIdentifier(String s) { mFileIdentifier = s; } public void setFileSource(String s) { mFileSource = s; } public void setRequestedStartingByte(int i) { mRequestedStartingByte = i; } }