File: DatebookAppInfo.java

package info (click to toggle)
pilot-link 0.12.5-dfsg-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 6,868 kB
  • ctags: 5,811
  • sloc: ansic: 53,153; sh: 10,459; java: 2,584; perl: 2,247; python: 1,044; makefile: 991; yacc: 662; cpp: 551; xml: 39
file content (59 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (6)
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
/*
 * Created on 15.02.2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package org.gnu.pilotlink;

/**
 * @author stephan
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class DatebookAppInfo extends AppInfo {
	private int startOfWeek=0;
	
	public DatebookAppInfo(int startofweek) {
		startOfWeek=startofweek;
	}
	/**
	 * @param ai
	 */
	public DatebookAppInfo(AppInfo ai) {
		super(ai);
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see org.gnu.pilotlink.AppInfo#setBuffer(byte[])
	 */
	public void setBuffer(byte[] b) {
		parseCategories();
		startOfWeek=b[dataOffset];
	}

	/**
	 * @return Returns the startOfWeek.
	 */
	public int getStartOfWeek() {
		return startOfWeek;
	}

	/**
	 * @param startOfWeek The startOfWeek to set.
	 */
	public void setStartOfWeek(int startOfWeek) {
		this.startOfWeek= startOfWeek;
	}
	/* (non-Javadoc)
	 * @see org.gnu.pilotlink.AppInfo#getBuffer()
	 */
	public byte[] getBuffer() {
		createDefaultBuffer();
		buffer[dataOffset]=(byte)startOfWeek;
		return buffer;
	}

}