public static List<Window> windows(InputStream words,int windowSize){
  Tokenizer tokenizer=new DefaultStreamTokenizer(words);
  List<String> list=new ArrayList<>();
  while (tokenizer.hasMoreTokens())   list.add(tokenizer.nextToken());
  return windows(list,windowSize);
}

public static List < Window > windows ( InputStream words , int windowSize ) { Tokenizer tokenizer = new DefaultStreamTokenizer ( words ) ; List < String > list = new ArrayList < > ( ) ; while ( tokenizer . hasMoreTokens ( ) ) list . add ( tokenizer . nextToken ( ) ) ; return windows ( list , windowSize ) ; }
constructs a list of window of size windowsize . note that padding for each window is created as well .
