Log.java 587 B

1234567891011121314151617181920212223242526272829303132
  1. package at.acdp.urweb.sclient;
  2. import at.acdp.urweb.sclient.data.ILogentry;
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. public class Log {
  6. private final static int LENGTH=100;
  7. public ILogentry[] list=new ILogentry[LENGTH];
  8. private int pos=0;
  9. public void add(ILogentry le) {
  10. synchronized (list) {
  11. list[pos]=le;
  12. }
  13. }
  14. public void get(int from) {
  15. synchronized (list){
  16. int idx=pos-from;
  17. // ILogentry[] ret=new ILogentry[];
  18. // System.arraycopy(list,from,ret,);
  19. }
  20. }
  21. }