gaz_lloyd

Untitled

Sep 12th, 2014
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. public Document getABFLog(Map<String,String> params) throws IOException, MediaWiki.MediaWikiException {
  2. final String url = createApiGetUrl(params);
  3.  
  4. networkLock.lock();
  5. try {
  6. final InputStream in = get(url);
  7. final Document xml = parse(in);
  8. // no checkError: no errors declared for this action
  9.  
  10. return xml;
  11. }
  12. finally {
  13. networkLock.unlock();
  14. }
  15. }
  16.  
  17. public InputStream getABFLogStream(Map<String,String> params) throws IOException, MediaWiki.MediaWikiException {
  18. final String url = createApiGetUrl(params);
  19.  
  20. networkLock.lock();
  21. try {
  22. final InputStream in = get(url);
  23. // no checkError: no errors declared for this action
  24.  
  25. return in;
  26. }
  27. finally {
  28. networkLock.unlock();
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment