gpt4 book ai didi

java - 检索用户帐户

转载 作者:行者123 更新时间:2023-12-01 07:42:29 25 4
gpt4 key购买 nike

我使用以下编码来显示我的域中的用户帐户。但在该编码中,它仅显示前 100 条记录。但在我的域中,有近 500 个用户帐户。我不知道此编码有什么问题

import java.net.URL;
import java.util.List;

import com.google.gdata.client.appsforyourdomain.UserService;
import com.google.gdata.data.appsforyourdomain.provisioning.UserEntry;
import com.google.gdata.data.appsforyourdomain.provisioning.UserFeed;

public class Readuser {
public int i3;
public String rn[]=new String[100];



public void read(){
try
{

// Create a new Apps Provisioning service
UserService myService = new UserService("My Application");
myService.setUserCredentials(admin,password);

// Get a list of all entries
URL metafeedUrl = new URL("https://www.google.com/a/feeds/"+domain+"/user/2.0/");
System.out.println("Getting user entries...\n");
UserFeed resultFeed = myService.getFeed(metafeedUrl, UserFeed.class);
List<UserEntry> entries = resultFeed.getEntries();

for(i3=0; i3<entries.size(); i3++) {
UserEntry entry = entries.get(i3);
rn[i3]= entry.getTitle().getPlainText();
System.out.println(rn[i3]);
}
System.out.println("\nTotal Entries: "+entries.size());
}
catch(Exception e) { System.out.print(e);}
}

public static void main(String args[])
{
Readuser ru=new Readuser();
ru.read();
}
}

最佳答案

您仅分配 100 个条目。

public  String rn[]=new String[100];

关于java - 检索用户帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2198348/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com