public class CpioHeader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BDEV |
static int |
CDEV |
protected Charset |
charset |
protected int |
checksum |
protected static int |
CPIO_HEADER |
static int |
DEFAULT_DIRECTORY_PERMISSION |
static int |
DEFAULT_FILE_PERMISSION |
static String |
DEFAULT_GROUP |
static String |
DEFAULT_USERNAME |
protected int |
devMajor |
protected int |
devMinor |
static int |
DIR |
static int |
FIFO |
static int |
FILE |
protected int |
filesize |
protected int |
flags |
protected int |
gid |
protected String |
gname |
protected long |
inode |
protected static String |
MAGIC |
protected long |
mtime |
protected String |
name |
protected int |
nlink |
protected int |
permissions |
protected int |
rdevMajor |
protected int |
rdevMinor |
static int |
SOCKET |
static int |
SYMLINK |
protected static String |
TRAILER |
protected int |
type |
protected int |
uid |
protected String |
uname |
protected int |
verifyFlags |
| Constructor and Description |
|---|
CpioHeader() |
CpioHeader(File file) |
CpioHeader(String name) |
CpioHeader(String name,
File file) |
CpioHeader(String name,
URL url) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDevMajor() |
int |
getDevMinor() |
int |
getFileSize() |
int |
getFlags() |
String |
getGname() |
long |
getInode() |
int |
getMode() |
int |
getMtime() |
String |
getName() |
int |
getPermissions() |
int |
getRdevMajor() |
int |
getRdevMinor() |
int |
getType() |
String |
getUname() |
int |
getVerifyFlags() |
boolean |
isLast()
Test to see if this is the last header, and is therefore the end of the
archive.
|
protected String |
pad(CharSequence sequence,
int length) |
int |
read(ReadableByteChannel channel,
int total) |
protected CharSequence |
readChars(CharBuffer buffer,
int length) |
protected Long |
readEight(CharBuffer buffer) |
protected CharSequence |
readSix(CharBuffer buffer) |
void |
setFileSize(int filesize) |
void |
setFlags(int flags) |
void |
setGname(String gname) |
void |
setInode(long inode) |
void |
setLast() |
void |
setMtime(long mtime) |
void |
setName(String name) |
void |
setPermissions(int permissions) |
void |
setType(int type) |
void |
setUname(String uname) |
void |
setVerifyFlags(int verifyFlags) |
protected int |
skip(ReadableByteChannel channel,
int total) |
int |
skip(WritableByteChannel channel,
int total) |
String |
toString() |
int |
write(WritableByteChannel channel,
int total)
Write the content for the CPIO header, including the name immediately following.
|
protected ByteBuffer |
writeEight(int data) |
protected ByteBuffer |
writeEight(long data) |
protected ByteBuffer |
writeSix(CharSequence data) |
public static final int DEFAULT_FILE_PERMISSION
public static final int DEFAULT_DIRECTORY_PERMISSION
public static final String DEFAULT_USERNAME
public static final String DEFAULT_GROUP
public static final int FIFO
public static final int CDEV
public static final int DIR
public static final int BDEV
public static final int FILE
public static final int SYMLINK
public static final int SOCKET
protected static final int CPIO_HEADER
protected static final String MAGIC
protected static final String TRAILER
protected Charset charset
protected long inode
protected int type
protected int permissions
protected int uid
protected String uname
protected int gid
protected String gname
protected int nlink
protected long mtime
protected int filesize
protected int devMinor
protected int devMajor
protected int rdevMinor
protected int rdevMajor
protected int checksum
protected String name
protected int flags
protected int verifyFlags
public CpioHeader()
public CpioHeader(String name)
public CpioHeader(File file)
public int getType()
public int getPermissions()
public int getRdevMajor()
public int getRdevMinor()
public int getDevMajor()
public int getDevMinor()
public int getMtime()
public long getInode()
public String getName()
public int getFlags()
public int getVerifyFlags()
public int getMode()
public void setPermissions(int permissions)
public void setType(int type)
public void setFileSize(int filesize)
public void setMtime(long mtime)
public void setInode(long inode)
public void setFlags(int flags)
public void setVerifyFlags(int verifyFlags)
public String getUname()
public String getGname()
public void setUname(String uname)
public void setGname(String gname)
public boolean isLast()
public void setLast()
public void setName(String name)
public int getFileSize()
protected ByteBuffer writeSix(CharSequence data)
protected ByteBuffer writeEight(long data)
protected ByteBuffer writeEight(int data)
protected CharSequence readSix(CharBuffer buffer)
protected Long readEight(CharBuffer buffer)
protected CharSequence readChars(CharBuffer buffer, int length)
protected String pad(CharSequence sequence, int length)
protected int skip(ReadableByteChannel channel, int total) throws IOException
IOExceptionpublic int skip(WritableByteChannel channel, int total) throws IOException
IOExceptionpublic int read(ReadableByteChannel channel, int total) throws IOException
IOExceptionpublic int write(WritableByteChannel channel, int total) throws IOException
channel - which channel to write ontotal - current size of header?IOException - there was an IO errorCopyright © 2015. All Rights Reserved.