private void handleStaticStopTrees(StaticMetadata.StopTreeRequest request,TransportNetwork transportNetwork,TaskStatistics ts){
  StaticMetadata staticMetadata=new StaticMetadata(request.request,transportNetwork);
  if (request.request.bucket != null) {
    try {
      OutputStream os=StaticDataStore.getOutputStream(request.request,"query.json","application/octet-stream");
      staticMetadata.writeStopTrees(os);
      os.close();
    }
 catch (    IOException e) {
      LOG.error("Error creating static stop trees",e);
    }
    deleteRequest(request);
  }
 else {
    try {
      PipedInputStream pis=new PipedInputStream();
      PipedOutputStream pos=new PipedOutputStream(pis);
      finishPriorityTask(request,pis);
      staticMetadata.writeStopTrees(pos);
      pos.close();
    }
 catch (    IOException e) {
      LOG.error("Error writing static stop trees to broker",e);
    }
  }
}

private void handleStaticStopTrees ( StaticMetadata . StopTreeRequest request , TransportNetwork transportNetwork , TaskStatistics ts ) { StaticMetadata staticMetadata = new StaticMetadata ( request . request , transportNetwork ) ; if ( request . request . bucket != null ) { try { OutputStream os = StaticDataStore . getOutputStream ( request . request , "query.json" , "application/octet-stream" ) ; staticMetadata . writeStopTrees ( os ) ; os . close ( ) ; } catch ( IOException e ) { LOG . error ( "Error creating static stop trees" , e ) ; } deleteRequest ( request ) ; } else { try { PipedInputStream pis = new PipedInputStream ( ) ; PipedOutputStream pos = new PipedOutputStream ( pis ) ; finishPriorityTask ( request , pis ) ; staticMetadata . writeStopTrees ( pos ) ; pos . close ( ) ; } catch ( IOException e ) { LOG . error ( "Error writing static stop trees to broker" , e ) ; } } }
produce static stop trees
