Android 从本地服务器下载文件与解析过程详解(五)

来源:互联网 发布:linux 发送http请求 编辑:程序博客网 时间:2024/06/15 01:40
(4)、数据部分代码:

java代码:

package com.pisces.model;
public class Mp3Info {
private String id;
private String mp3Name;
private String mp3Size;
private String lrcName;
private String lrcSize;
public Mp3Info() {
super();
}
public Mp3Info(String id, String mp3Name, String mp3Size, String lrcName,String lrcSize) {
super();
this.id = id;
this.mp3Name= mp3Name;
this.mp3Size= mp3Size;
this.lrcName= lrcName;
this.lrcSize= lrcSize;
}
public String getId() {
return id;
}
@Override
public String toString() {
return "Mp3Info [id="+ id + ", lrcName="+ lrcName + ", lrcSize="
+ lrcSize + ", mp3Name="+ mp3Name + ", mp3Size="+ mp3Size + "";
}
public void setId(String id) {
this.id = id;
}
public String getMp3Name() {
return mp3Name;
}
public void setMp3Name(String mp3Name) {
this.mp3Name= mp3Name;
}
public String getMp3Size() {
return mp3Size;
}
public void setMp3Size(String mp3Size) {
this.mp3Size= mp3Size;
}
public String getLrcName() {
return lrcName;
}
public void setLrcName(String lrcName) {
this.lrcName= lrcName;
}
public String getLrcSize() {
return lrcSize;
}
public void setLrcSize(String lrcSize) {
this.lrcSize= lrcSize;
}
}

        4、为应用程序添加相应的权限:
        <uses-permission android:name="android.permission.INTERNET"/>

原创粉丝点击