/usr/share/doc/libganymed-ssh2-java/api/ch/ethz/ssh2/SFTPv3Client.html is in libganymed-ssh2-java 250-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Wed Sep 14 21:06:29 UTC 2011 -->
<TITLE>
SFTPv3Client
</TITLE>
<META NAME="date" CONTENT="2011-09-14">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SFTPv3Client";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../ch/ethz/ssh2/SFTPException.html" title="class in ch.ethz.ssh2"><B>PREV CLASS</B></A>
<A HREF="../../../ch/ethz/ssh2/SFTPv3DirectoryEntry.html" title="class in ch.ethz.ssh2"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?ch/ethz/ssh2/SFTPv3Client.html" target="_top"><B>FRAMES</B></A>
<A HREF="SFTPv3Client.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
ch.ethz.ssh2</FONT>
<BR>
Class SFTPv3Client</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>ch.ethz.ssh2.SFTPv3Client</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SFTPv3Client</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
A <code>SFTPv3Client</code> represents a SFTP (protocol version 3)
client connection tunnelled over a SSH-2 connection. This is a very simple
(synchronous) implementation.
<p>
Basically, most methods in this class map directly to one of
the packet types described in draft-ietf-secsh-filexfer-02.txt.
<p>
Note: this is experimental code.
<p>
Error handling: the methods of this class throw IOExceptions. However, unless
there is catastrophic failure, exceptions of the type <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>SFTPv3Client</CODE></A> will
be thrown (a subclass of IOException). Therefore, you can implement more verbose
behavior by checking if a thrown exception if of this type. If yes, then you
can cast the exception and access detailed information about the failure.
<p>
Notes about file names, directory names and paths, copy-pasted
from the specs:
<ul>
<li>SFTP v3 represents file names as strings. File names are
assumed to use the slash ('/') character as a directory separator.</li>
<li>File names starting with a slash are "absolute", and are relative to
the root of the file system. Names starting with any other character
are relative to the user's default directory (home directory).</li>
<li>Servers SHOULD interpret a path name component ".." as referring to
the parent directory, and "." as referring to the current directory.
If the server implementation limits access to certain parts of the
file system, it must be extra careful in parsing file names when
enforcing such restrictions. There have been numerous reported
security bugs where a ".." in a path name has allowed access outside
the intended area.</li>
<li>An empty path name is valid, and it refers to the user's default
directory (usually the user's home directory).</li>
</ul>
<p>
If you are still not tired then please go on and read the comment for
<A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#setCharset(java.lang.String)"><CODE>setCharset(String)</CODE></A>.
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#SFTPv3Client(ch.ethz.ssh2.Connection)">SFTPv3Client</A></B>(<A HREF="../../../ch/ethz/ssh2/Connection.html" title="class in ch.ethz.ssh2">Connection</A> conn)</CODE>
<BR>
Create a SFTP v3 client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#SFTPv3Client(ch.ethz.ssh2.Connection, java.io.PrintStream)">SFTPv3Client</A></B>(<A HREF="../../../ch/ethz/ssh2/Connection.html" title="class in ch.ethz.ssh2">Connection</A> conn,
java.io.PrintStream debug)</CODE>
<BR>
<B>Deprecated.</B> <I>this constructor (debug version) will disappear in the future,
use <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#SFTPv3Client(ch.ethz.ssh2.Connection)"><CODE>SFTPv3Client(Connection)</CODE></A> instead.</I></TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#canonicalPath(java.lang.String)">canonicalPath</A></B>(java.lang.String path)</CODE>
<BR>
Have the server canonicalize any given path name to an absolute path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#close()">close</A></B>()</CODE>
<BR>
Close this SFTP session.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#closeFile(ch.ethz.ssh2.SFTPv3FileHandle)">closeFile</A></B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle)</CODE>
<BR>
Close a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFile(java.lang.String)">createFile</A></B>(java.lang.String fileName)</CODE>
<BR>
Create a file and open it for reading and writing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFile(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)">createFile</A></B>(java.lang.String fileName,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)</CODE>
<BR>
Create a file and open it for reading and writing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFileTruncate(java.lang.String)">createFileTruncate</A></B>(java.lang.String fileName)</CODE>
<BR>
Create a file (truncate it if it already exists) and open it for reading and writing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFileTruncate(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)">createFileTruncate</A></B>(java.lang.String fileName,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)</CODE>
<BR>
reate a file (truncate it if it already exists) and open it for reading and writing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createSymlink(java.lang.String, java.lang.String)">createSymlink</A></B>(java.lang.String src,
java.lang.String target)</CODE>
<BR>
Create a symbolic link on the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#fsetstat(ch.ethz.ssh2.SFTPv3FileHandle, ch.ethz.ssh2.SFTPv3FileAttributes)">fsetstat</A></B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)</CODE>
<BR>
Modify the attributes of a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#fstat(ch.ethz.ssh2.SFTPv3FileHandle)">fstat</A></B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle)</CODE>
<BR>
Retrieve the file attributes of an open file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#getCharset()">getCharset</A></B>()</CODE>
<BR>
The currently used charset for filename encoding/decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#getProtocolVersion()">getProtocolVersion</A></B>()</CODE>
<BR>
Returns the negotiated SFTP protocol version between the client and the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#ls(java.lang.String)">ls</A></B>(java.lang.String dirName)</CODE>
<BR>
List the contents of a directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#lstat(java.lang.String)">lstat</A></B>(java.lang.String path)</CODE>
<BR>
Retrieve the file attributes of a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#mkdir(java.lang.String, int)">mkdir</A></B>(java.lang.String dirName,
int posixPermissions)</CODE>
<BR>
Create a new directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#mv(java.lang.String, java.lang.String)">mv</A></B>(java.lang.String oldPath,
java.lang.String newPath)</CODE>
<BR>
Move a file or directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#openFileRO(java.lang.String)">openFileRO</A></B>(java.lang.String fileName)</CODE>
<BR>
Open a file for reading.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#openFileRW(java.lang.String)">openFileRW</A></B>(java.lang.String fileName)</CODE>
<BR>
Open a file for reading and writing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#read(ch.ethz.ssh2.SFTPv3FileHandle, long, byte[], int, int)">read</A></B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
long fileOffset,
byte[] dst,
int dstoff,
int len)</CODE>
<BR>
Read bytes from a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#readLink(java.lang.String)">readLink</A></B>(java.lang.String path)</CODE>
<BR>
Read the target of a symbolic link.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#rm(java.lang.String)">rm</A></B>(java.lang.String fileName)</CODE>
<BR>
Remove a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#rmdir(java.lang.String)">rmdir</A></B>(java.lang.String dirName)</CODE>
<BR>
Remove an empty directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#setCharset(java.lang.String)">setCharset</A></B>(java.lang.String charset)</CODE>
<BR>
Set the charset used to convert between Java Unicode Strings and byte encodings
used by the server for paths and file names.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#setstat(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)">setstat</A></B>(java.lang.String path,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)</CODE>
<BR>
Modify the attributes of a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#stat(java.lang.String)">stat</A></B>(java.lang.String path)</CODE>
<BR>
Retrieve the file attributes of a file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#write(ch.ethz.ssh2.SFTPv3FileHandle, long, byte[], int, int)">write</A></B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
long fileOffset,
byte[] src,
int srcoff,
int len)</CODE>
<BR>
Write bytes to a file.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="SFTPv3Client(ch.ethz.ssh2.Connection, java.io.PrintStream)"><!-- --></A><H3>
SFTPv3Client</H3>
<PRE>
public <B>SFTPv3Client</B>(<A HREF="../../../ch/ethz/ssh2/Connection.html" title="class in ch.ethz.ssh2">Connection</A> conn,
java.io.PrintStream debug)
throws java.io.IOException</PRE>
<DL>
<DD><B>Deprecated.</B> <I>this constructor (debug version) will disappear in the future,
use <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#SFTPv3Client(ch.ethz.ssh2.Connection)"><CODE>SFTPv3Client(Connection)</CODE></A> instead.</I>
<P>
<DD>Create a SFTP v3 client.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>conn</CODE> - The underlying SSH-2 connection to be used.<DD><CODE>debug</CODE> -
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>
<HR>
<A NAME="SFTPv3Client(ch.ethz.ssh2.Connection)"><!-- --></A><H3>
SFTPv3Client</H3>
<PRE>
public <B>SFTPv3Client</B>(<A HREF="../../../ch/ethz/ssh2/Connection.html" title="class in ch.ethz.ssh2">Connection</A> conn)
throws java.io.IOException</PRE>
<DL>
<DD>Create a SFTP v3 client.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>conn</CODE> - The underlying SSH-2 connection to be used.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setCharset(java.lang.String)"><!-- --></A><H3>
setCharset</H3>
<PRE>
public void <B>setCharset</B>(java.lang.String charset)
throws java.io.IOException</PRE>
<DL>
<DD>Set the charset used to convert between Java Unicode Strings and byte encodings
used by the server for paths and file names. Unfortunately, the SFTP v3 draft
says NOTHING about such conversions (well, with the exception of error messages
which have to be in UTF-8). Newer drafts specify to use UTF-8 for file names
(if I remember correctly). However, a quick test using OpenSSH serving a EXT-3
filesystem has shown that UTF-8 seems to be a bad choice for SFTP v3 (tested with
filenames containing german umlauts). "windows-1252" seems to work better for Europe.
Luckily, "windows-1252" is the platform default in my case =).
<p>
If you don't set anything, then the platform default will be used (this is the default
behavior).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charset</CODE> - the name of the charset to be used or <code>null</code> to use the platform's
default encoding.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#getCharset()"><CODE>getCharset()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getCharset()"><!-- --></A><H3>
getCharset</H3>
<PRE>
public java.lang.String <B>getCharset</B>()</PRE>
<DL>
<DD>The currently used charset for filename encoding/decoding.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The name of the charset (<code>null</code> if the platform's default charset is being used)<DT><B>See Also:</B><DD><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#setCharset(java.lang.String)"><CODE>setCharset(String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="fstat(ch.ethz.ssh2.SFTPv3FileHandle)"><!-- --></A><H3>
fstat</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> <B>fstat</B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle)
throws java.io.IOException</PRE>
<DL>
<DD>Retrieve the file attributes of an open file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - a SFTPv3FileHandle handle.
<DT><B>Returns:</B><DD>a SFTPv3FileAttributes object.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="stat(java.lang.String)"><!-- --></A><H3>
stat</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> <B>stat</B>(java.lang.String path)
throws java.io.IOException</PRE>
<DL>
<DD>Retrieve the file attributes of a file. This method
follows symbolic links on the server.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileAttributes object.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#lstat(java.lang.String)"><CODE>lstat(String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="lstat(java.lang.String)"><!-- --></A><H3>
lstat</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> <B>lstat</B>(java.lang.String path)
throws java.io.IOException</PRE>
<DL>
<DD>Retrieve the file attributes of a file. This method
does NOT follow symbolic links on the server.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileAttributes object.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE><DT><B>See Also:</B><DD><A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#stat(java.lang.String)"><CODE>stat(String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="readLink(java.lang.String)"><!-- --></A><H3>
readLink</H3>
<PRE>
public java.lang.String <B>readLink</B>(java.lang.String path)
throws java.io.IOException</PRE>
<DL>
<DD>Read the target of a symbolic link.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>The target of the link.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setstat(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)"><!-- --></A><H3>
setstat</H3>
<PRE>
public void <B>setstat</B>(java.lang.String path,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)
throws java.io.IOException</PRE>
<DL>
<DD>Modify the attributes of a file. Used for operations such as changing
the ownership, permissions or access times, as well as for truncating a file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>attr</CODE> - A SFTPv3FileAttributes object. Specifies the modifications to be
made to the attributes of the file. Empty fields will be ignored.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="fsetstat(ch.ethz.ssh2.SFTPv3FileHandle, ch.ethz.ssh2.SFTPv3FileAttributes)"><!-- --></A><H3>
fsetstat</H3>
<PRE>
public void <B>fsetstat</B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)
throws java.io.IOException</PRE>
<DL>
<DD>Modify the attributes of a file. Used for operations such as changing
the ownership, permissions or access times, as well as for truncating a file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - a SFTPv3FileHandle handle<DD><CODE>attr</CODE> - A SFTPv3FileAttributes object. Specifies the modifications to be
made to the attributes of the file. Empty fields will be ignored.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createSymlink(java.lang.String, java.lang.String)"><!-- --></A><H3>
createSymlink</H3>
<PRE>
public void <B>createSymlink</B>(java.lang.String src,
java.lang.String target)
throws java.io.IOException</PRE>
<DL>
<DD>Create a symbolic link on the server. Creates a link "src" that points
to "target".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>src</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>target</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="canonicalPath(java.lang.String)"><!-- --></A><H3>
canonicalPath</H3>
<PRE>
public java.lang.String <B>canonicalPath</B>(java.lang.String path)
throws java.io.IOException</PRE>
<DL>
<DD>Have the server canonicalize any given path name to an absolute path.
This is useful for converting path names containing ".." components or
relative pathnames without a leading slash into absolute paths.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>path</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>An absolute path.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getProtocolVersion()"><!-- --></A><H3>
getProtocolVersion</H3>
<PRE>
public int <B>getProtocolVersion</B>()</PRE>
<DL>
<DD>Returns the negotiated SFTP protocol version between the client and the server.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>SFTP protocol version, i.e., "3".</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()</PRE>
<DL>
<DD>Close this SFTP session. NEVER forget to call this method to free up
resources - even if you got an exception from one of the other methods.
Sometimes these other methods may throw an exception, saying that the
underlying channel is closed (this can happen, e.g., if the other server
sent a close message.) However, as long as you have not called the
<code>close()</code> method, you are likely wasting resources.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ls(java.lang.String)"><!-- --></A><H3>
ls</H3>
<PRE>
public java.util.Vector <B>ls</B>(java.lang.String dirName)
throws java.io.IOException</PRE>
<DL>
<DD>List the contents of a directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dirName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>A Vector containing <A HREF="../../../ch/ethz/ssh2/SFTPv3DirectoryEntry.html" title="class in ch.ethz.ssh2"><CODE>SFTPv3DirectoryEntry</CODE></A> objects.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="mkdir(java.lang.String, int)"><!-- --></A><H3>
mkdir</H3>
<PRE>
public void <B>mkdir</B>(java.lang.String dirName,
int posixPermissions)
throws java.io.IOException</PRE>
<DL>
<DD>Create a new directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dirName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>posixPermissions</CODE> - the permissions for this directory, e.g., "0700" (remember that
this is octal noation). The server will likely apply a umask.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="rm(java.lang.String)"><!-- --></A><H3>
rm</H3>
<PRE>
public void <B>rm</B>(java.lang.String fileName)
throws java.io.IOException</PRE>
<DL>
<DD>Remove a file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="rmdir(java.lang.String)"><!-- --></A><H3>
rmdir</H3>
<PRE>
public void <B>rmdir</B>(java.lang.String dirName)
throws java.io.IOException</PRE>
<DL>
<DD>Remove an empty directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dirName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="mv(java.lang.String, java.lang.String)"><!-- --></A><H3>
mv</H3>
<PRE>
public void <B>mv</B>(java.lang.String oldPath,
java.lang.String newPath)
throws java.io.IOException</PRE>
<DL>
<DD>Move a file or directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>oldPath</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>newPath</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="openFileRO(java.lang.String)"><!-- --></A><H3>
openFileRO</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>openFileRO</B>(java.lang.String fileName)
throws java.io.IOException</PRE>
<DL>
<DD>Open a file for reading.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="openFileRW(java.lang.String)"><!-- --></A><H3>
openFileRW</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>openFileRW</B>(java.lang.String fileName)
throws java.io.IOException</PRE>
<DL>
<DD>Open a file for reading and writing.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createFile(java.lang.String)"><!-- --></A><H3>
createFile</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>createFile</B>(java.lang.String fileName)
throws java.io.IOException</PRE>
<DL>
<DD>Create a file and open it for reading and writing.
Same as <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFile(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)"><CODE>createFile(fileName, null)</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createFile(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)"><!-- --></A><H3>
createFile</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>createFile</B>(java.lang.String fileName,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)
throws java.io.IOException</PRE>
<DL>
<DD>Create a file and open it for reading and writing.
You can specify the default attributes of the file (the server may or may
not respect your wishes).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>attr</CODE> - may be <code>null</code> to use server defaults. Probably only
the <code>uid</code>, <code>gid</code> and <code>permissions</code>
(remember the server may apply a umask) entries of the <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2"><CODE>SFTPv3FileHandle</CODE></A>
structure make sense. You need only to set those fields where you want
to override the server's defaults.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createFileTruncate(java.lang.String)"><!-- --></A><H3>
createFileTruncate</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>createFileTruncate</B>(java.lang.String fileName)
throws java.io.IOException</PRE>
<DL>
<DD>Create a file (truncate it if it already exists) and open it for reading and writing.
Same as <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html#createFileTruncate(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)"><CODE>createFileTruncate(fileName, null)</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createFileTruncate(java.lang.String, ch.ethz.ssh2.SFTPv3FileAttributes)"><!-- --></A><H3>
createFileTruncate</H3>
<PRE>
public <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> <B>createFileTruncate</B>(java.lang.String fileName,
<A HREF="../../../ch/ethz/ssh2/SFTPv3FileAttributes.html" title="class in ch.ethz.ssh2">SFTPv3FileAttributes</A> attr)
throws java.io.IOException</PRE>
<DL>
<DD>reate a file (truncate it if it already exists) and open it for reading and writing.
You can specify the default attributes of the file (the server may or may
not respect your wishes).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileName</CODE> - See the <A HREF="../../../ch/ethz/ssh2/SFTPv3Client.html" title="class in ch.ethz.ssh2"><CODE>comment</CODE></A> for the class for more details.<DD><CODE>attr</CODE> - may be <code>null</code> to use server defaults. Probably only
the <code>uid</code>, <code>gid</code> and <code>permissions</code>
(remember the server may apply a umask) entries of the <A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2"><CODE>SFTPv3FileHandle</CODE></A>
structure make sense. You need only to set those fields where you want
to override the server's defaults.
<DT><B>Returns:</B><DD>a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="read(ch.ethz.ssh2.SFTPv3FileHandle, long, byte[], int, int)"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
long fileOffset,
byte[] dst,
int dstoff,
int len)
throws java.io.IOException</PRE>
<DL>
<DD>Read bytes from a file. No more than 32768 bytes may be read at once.
Be aware that the semantics of read() are different than for Java streams.
<p>
<ul>
<li>The server will read as many bytes as it can from the file (up to <code>len</code>),
and return them.</li>
<li>If EOF is encountered before reading any data, <code>-1</code> is returned.
<li>If an error occurs, an exception is thrown</li>.
<li>For normal disk files, it is guaranteed that the server will return the specified
number of bytes, or up to end of file. For, e.g., device files this may return
fewer bytes than requested.</li>
</ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - a SFTPv3FileHandle handle<DD><CODE>fileOffset</CODE> - offset (in bytes) in the file<DD><CODE>dst</CODE> - the destination byte array<DD><CODE>dstoff</CODE> - offset in the destination byte array<DD><CODE>len</CODE> - how many bytes to read, 0 < len <= 32768 bytes
<DT><B>Returns:</B><DD>the number of bytes that could be read, may be less than requested if
the end of the file is reached, -1 is returned in case of <code>EOF</code>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(ch.ethz.ssh2.SFTPv3FileHandle, long, byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle,
long fileOffset,
byte[] src,
int srcoff,
int len)
throws java.io.IOException</PRE>
<DL>
<DD>Write bytes to a file. If <code>len</code> > 32768, then the write operation will
be split into multiple writes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - a SFTPv3FileHandle handle.<DD><CODE>fileOffset</CODE> - offset (in bytes) in the file.<DD><CODE>src</CODE> - the source byte array.<DD><CODE>srcoff</CODE> - offset in the source byte array.<DD><CODE>len</CODE> - how many bytes to write.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="closeFile(ch.ethz.ssh2.SFTPv3FileHandle)"><!-- --></A><H3>
closeFile</H3>
<PRE>
public void <B>closeFile</B>(<A HREF="../../../ch/ethz/ssh2/SFTPv3FileHandle.html" title="class in ch.ethz.ssh2">SFTPv3FileHandle</A> handle)
throws java.io.IOException</PRE>
<DL>
<DD>Close a file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - a SFTPv3FileHandle handle
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../ch/ethz/ssh2/SFTPException.html" title="class in ch.ethz.ssh2"><B>PREV CLASS</B></A>
<A HREF="../../../ch/ethz/ssh2/SFTPv3DirectoryEntry.html" title="class in ch.ethz.ssh2"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?ch/ethz/ssh2/SFTPv3Client.html" target="_top"><B>FRAMES</B></A>
<A HREF="SFTPv3Client.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|