1 29 30 package com.caucho.vfs; 31 32 import com.caucho.util.L10N; 33 34 import java.io.IOException ; 35 import java.io.OutputStream ; 36 import java.util.ArrayList ; 37 import java.util.Iterator ; 38 import java.util.Map ; 39 40 43 public abstract class PathWrapper extends Path { 44 protected final static L10N L = new L10N(PathWrapper.class); 45 46 private final Path _path; 47 48 53 protected PathWrapper(Path path) 54 { 55 super(path); 56 57 _path = path; 58 } 59 60 63 public Path getWrappedPath() 64 { 65 return _path; 66 } 67 68 79 public Path lookup(String userPath, Map <String ,Object > newAttributes) 80 { 81 return getWrappedPath().lookup(userPath, newAttributes); 82 } 83 84 95 public Path lookupImpl(String userPath, Map <String ,Object > newAttributes) 96 { 97 return getWrappedPath().lookupImpl(userPath, newAttributes); 98 } 99 100 103 public Path lookupNative(String name, Map <String ,Object > attributes) 104 { 105 return getWrappedPath().lookupNative(name, attributes); 106 } 107 108 112 public ArrayList <Path> getResources(String name) 113 { 114 return getWrappedPath().getResources(name); 115 } 116 117 121 public ArrayList <Path> getResources() 122 { 123 return getWrappedPath().getResources(); 124 } 125 126 129 public Path getParent() 130 { 131 return getWrappedPath().getParent(); 132 } 133 134 144 protected Path schemeWalk(String userPath, 145 Map <String ,Object > newAttributes, 146 String newPath, int offset) 147 { 148 return getWrappedPath().schemeWalk(userPath, newAttributes, 149 newPath, offset); 150 } 151 152 155 public String getURL() 156 { 157 return getWrappedPath().getURL(); 158 } 159 160 163 public String getScheme() 164 { 165 return getWrappedPath().getScheme(); 166 } 167 168 171 public String getHost() 172 { 173 return getWrappedPath().getHost(); 174 } 175 176 179 public int getPort() 180 { 181 return getWrappedPath().getPort(); 182 } 183 184 188 public String getPath() 189 { 190 return getWrappedPath().getPath(); 191 } 192 193 199 public String getTail() 200 { 201 return getWrappedPath().getTail(); 202 } 203 204 207 public String getQuery() 208 { 209 return getWrappedPath().getQuery(); 210 } 211 212 218 public String getNativePath() 219 { 220 return getWrappedPath().getNativePath(); 221 } 222 223 235 public String getUserPath() 236 { 237 return getWrappedPath().getUserPath(); 238 } 239 240 244 public void setUserPath(String userPath) 245 { 246 getWrappedPath().setUserPath(userPath); 247 } 248 249 259 public String getFullPath() 260 { 261 return getWrappedPath().getFullPath(); 262 } 263 264 268 public String getRelativePath() 269 { 270 return getWrappedPath().getRelativePath(); 271 } 272 273 276 public boolean exists() 277 { 278 return getWrappedPath().exists(); 279 } 280 281 285 public String getContentType() 286 { 287 return getWrappedPath().getContentType(); 288 } 289 290 293 public boolean isDirectory() 294 { 295 return getWrappedPath().isDirectory(); 296 } 297 298 301 public boolean isFile() 302 { 303 return getWrappedPath().isFile(); 304 } 305 306 309 public boolean isObject() 310 { 311 return getWrappedPath().isObject(); 312 } 313 314 318 public long getLength() 319 { 320 return getWrappedPath().getLength(); 321 } 322 323 328 public long getLastModified() 329 { 330 return getWrappedPath().getLastModified(); 331 } 332 333 public void setLastModified(long time) 334 { 335 getWrappedPath().setLastModified(time); 336 } 337 338 343 public long getLastAccessTime() 344 { 345 return getWrappedPath().getLastAccessTime(); 346 } 347 348 353 public long getCreateTime() 354 { 355 return getWrappedPath().getCreateTime(); 356 } 357 358 361 public boolean canRead() 362 { 363 return getWrappedPath().canRead(); 364 } 365 366 369 public boolean canWrite() 370 { 371 return getWrappedPath().canWrite(); 372 } 373 374 377 public boolean chmod(int value) 378 { 379 return getWrappedPath().chmod(value); 380 } 381 382 386 public String []list() throws IOException 387 { 388 return getWrappedPath().list(); 389 } 390 391 394 public Iterator <String > iterator() throws IOException 395 { 396 return getWrappedPath().iterator(); 397 } 398 399 403 public boolean mkdir() throws IOException 404 { 405 return getWrappedPath().mkdir(); 406 } 407 408 412 public boolean mkdirs() throws IOException 413 { 414 return getWrappedPath().mkdirs(); 415 } 416 417 421 public boolean remove() throws IOException 422 { 423 return getWrappedPath().remove(); 424 } 425 426 431 public boolean removeAll() throws IOException 432 { 433 return getWrappedPath().removeAll(); 434 } 435 436 440 public boolean renameTo(Path path) throws IOException 441 { 442 return getWrappedPath().renameTo(path); 443 } 444 445 453 public Path createRoot() 454 { 455 return getWrappedPath().createRoot(); 456 } 457 458 public Path createRoot(SchemeMap schemeMap) 459 { 460 return getWrappedPath().createRoot(schemeMap); 461 } 462 463 468 public void bind(Path context) 469 { 470 getWrappedPath().bind(context); 471 } 472 473 476 public void unbind() 477 { 478 getWrappedPath().unbind(); 479 } 480 481 488 public Object getValue() throws Exception 489 { 490 return getWrappedPath().getValue(); 491 } 492 493 500 public void setValue(Object obj) throws Exception 501 { 502 getWrappedPath().setValue(obj); 503 } 504 505 508 public Object getAttribute(String name) throws IOException 509 { 510 return getWrappedPath().getAttribute(name); 511 } 512 513 517 public Iterator getAttributeNames() throws IOException 518 { 519 return getWrappedPath().getAttributeNames(); 520 } 521 522 528 public ReadWritePair openReadWrite() throws IOException 529 { 530 return getWrappedPath().openReadWrite(); 531 } 532 533 542 public void openReadWrite(ReadStream is, WriteStream os) throws IOException 543 { 544 getWrappedPath().openReadWrite(is, os); 545 } 546 547 550 public WriteStream openAppend() throws IOException 551 { 552 return getWrappedPath().openAppend(); 553 } 554 555 558 public RandomAccessStream openRandomAccess() throws IOException 559 { 560 return getWrappedPath().openRandomAccess(); 561 } 562 563 567 public boolean createNewFile() throws IOException 568 { 569 return getWrappedPath().createNewFile(); 570 } 571 572 579 public Path createTempFile(String prefix, String suffix) throws IOException 580 { 581 return getWrappedPath().createTempFile(prefix, suffix); 582 } 583 584 589 public void writeToStream(OutputStream os) 590 throws IOException 591 { 592 getWrappedPath().writeToStream(os); 593 } 594 595 600 public void writeToStream(OutputStreamWithBuffer os) 601 throws IOException 602 { 603 getWrappedPath().writeToStream(os); 604 } 605 606 609 public long getCrc64() 610 { 611 return getWrappedPath().getCrc64(); 612 } 613 614 618 public Object getObject() 619 throws IOException 620 { 621 return getWrappedPath().getObject(); 622 } 623 624 628 public void setObject(Object obj) 629 throws IOException 630 { 631 getWrappedPath().setObject(obj); 632 } 633 634 public long getInode() 635 { 636 return getWrappedPath().getInode(); 637 } 638 639 public boolean isExecutable() 640 { 641 return getWrappedPath().isExecutable(); 642 } 643 644 public boolean setExecutable(boolean isExecutable) 645 { 646 return getWrappedPath().setExecutable(isExecutable); 647 } 648 649 public int getGroup() 650 { 651 return getWrappedPath().getGroup(); 652 } 653 654 public boolean changeGroup(int gid) 655 throws IOException 656 { 657 return getWrappedPath().changeGroup(gid); 658 } 659 660 public boolean changeGroup(String groupName) 661 throws IOException 662 { 663 return getWrappedPath().changeGroup(groupName); 664 } 665 666 public int getOwner() 667 { 668 return getWrappedPath().getOwner(); 669 } 670 671 public boolean changeOwner(int uid) 672 throws IOException 673 { 674 return getWrappedPath().changeOwner(uid); 675 } 676 677 public boolean changeOwner(String ownerName) 678 throws IOException 679 { 680 return getWrappedPath().changeOwner(ownerName); 681 } 682 683 public long getDiskSpaceFree() 684 { 685 return getWrappedPath().getDiskSpaceFree(); 686 } 687 688 public long getDiskSpaceTotal() 689 { 690 return getWrappedPath().getDiskSpaceTotal(); 691 } 692 693 public int hashCode() 694 { 695 return getWrappedPath().hashCode(); 696 } 697 698 public boolean equals(Object o) 699 { 700 return o.equals(getWrappedPath()); 701 } 702 703 public String toString() 704 { 705 return getWrappedPath().toString(); 706 } 707 708 public StreamImpl openReadImpl() throws IOException 709 { 710 return getWrappedPath().openReadImpl(); 711 } 712 713 public StreamImpl openWriteImpl() throws IOException 714 { 715 return getWrappedPath().openWriteImpl(); 716 } 717 718 public StreamImpl openReadWriteImpl() throws IOException 719 { 720 return getWrappedPath().openReadWriteImpl(); 721 } 722 723 public StreamImpl openAppendImpl() throws IOException 724 { 725 return getWrappedPath().openAppendImpl(); 726 } 727 } 728 | Popular Tags |