Changeset 14
- Timestamp:
- 10/01/02 19:03:57 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/SystemBuffer.java
r2 r14 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: SystemBuffer.java,v 1. 1.1.1 2002-09-24 16:08:24piso Exp $5 * $Id: SystemBuffer.java,v 1.2 2002-10-01 19:03:57 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 26 26 import java.io.InputStream; 27 27 import java.io.UnsupportedEncodingException; 28 import java.util.List; 28 29 29 30 // System buffers are NOT linked into the normal buffer ring. 30 public class SystemBuffer extends AbstractBufferimplements Constants31 public class SystemBuffer implements Constants 31 32 { 33 public static final int TYPE_SYSTEM = 0; 34 public static final int TYPE_NORMAL = 1; 35 public static final int TYPE_ARCHIVE = 2; 36 public static final int TYPE_DIRECTORY = 3; 37 public static final int TYPE_SHELL = 4; 38 public static final int TYPE_COMPILATION = 5; 39 public static final int TYPE_MAN = 6; 40 public static final int TYPE_OUTPUT = 7; 41 public static final int TYPE_IMAGE = 8; 42 public static final int TYPE_MAILBOX = 9; 43 public static final int TYPE_TELNET = 10; 44 public static final int TYPE_SSH = 11; 45 public static final int TYPE_LIST_OCCURRENCES = 12; 46 47 protected int type = TYPE_SYSTEM; 32 48 protected boolean isLoaded; 33 49 protected boolean readOnly; 50 protected boolean forceReadOnly; 34 51 protected Mode mode; 35 52 protected String lineSeparator; 36 53 protected int lineCount; 37 54 38 boolean forceReadOnly;39 55 private Line firstLine; 56 private Line lastLine; 40 57 private File file; 41 58 private String loadEncoding; 42 private Li ne lastLine;59 private List tags; 43 60 private View lastView; 44 61 … … 52 69 } 53 70 71 public final int getType() 72 { 73 return type; 74 } 75 76 public final Line getFirstLine() 77 { 78 return firstLine; 79 } 80 81 public final void setFirstLine(Line line) 82 { 83 firstLine = line; 84 } 85 86 public final Position getEnd() 87 { 88 Line line = firstLine; 89 if (line == null) 90 return null; 91 while (line.next() != null) 92 line = line.next(); 93 return new Position(line, line.length()); 94 } 95 54 96 public final File getFile() 55 97 { … … 85 127 { 86 128 return mode == null ? null : mode.toString(); 129 } 130 131 public final List getTags() 132 { 133 return tags; 134 } 135 136 public final void setTags(List tags) 137 { 138 this.tags = tags; 139 } 140 141 public final void setForceReadOnly(boolean b) 142 { 143 forceReadOnly = b; 87 144 } 88 145
Note: See TracChangeset
for help on using the changeset viewer.