private String extractBoundary(String line){
  int index=line.lastIndexOf("boundary=");
  if (index == -1) {
    return null;
  }
  String boundary=line.substring(index + 9);
  if (boundary.charAt(0) == '"') {
    index=boundary.lastIndexOf('"');
    boundary=boundary.substring(1,index);
  }
  boundary="--" + boundary;
  return boundary;
}

private String extractBoundary ( String line ) { int index = line . lastIndexOf ( "boundary=" ) ; if ( index == - 1 ) { return null ; } String boundary = line . substring ( index + 9 ) ; if ( boundary . charAt ( 0 ) == '"' ) { index = boundary . lastIndexOf ( '"' ) ; boundary = boundary . substring ( 1 , index ) ; } boundary = "--" + boundary ; return boundary ; }
extracts and returns the boundary token from a line .
