Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.filebuffers
Interface ITextFileBuffer

All Superinterfaces:
IFileBuffer

public interface ITextFileBuffer
extends IFileBuffer

A text file buffer is a file buffer for text files. The contents of a text file buffer is given in the form of a document and an associated annotation model. Also, the text file buffer provides methods to manage the character encoding used to read and write the buffer's underlying text file.

Clients are not supposed to implement that interface. Instances of this type are obtained from a ITextFileBufferManager.

Since:
3.0
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.

Method Summary
  IAnnotationModel getAnnotationModel ()
          Returns the annotation model of this text file buffer.
  IDocument getDocument ()
          Returns the document of this text file buffer.
  String getEncoding ()
          Returns the character encoding to be used for reading and writing the buffer's underlying file.
 void setEncoding ( String encoding)
          Sets the character encoding to be used for reading and writing the buffer's underlying file.
 
Methods inherited from interface org.eclipse.core.filebuffers. IFileBuffer
commit, computeCommitRule, computeValidateStateRule, getContentType, getFileStore, getLocation, getModificationStamp, getStatus, isCommitable, isDirty, isShared, isStateValidated, isSynchronizationContextRequested, isSynchronized, releaseSynchronizationContext, requestSynchronizationContext, resetStateValidation, revert, setDirty, validateState
 

Method Detail

getDocument

IDocument getDocument()
Returns the document of this text file buffer.

Returns:
the document of this text file buffer

getEncoding

String getEncoding()
Returns the character encoding to be used for reading and writing the buffer's underlying file.

Note: The encoding used to write the file might differ from the encoding returned by this method if no encoding has been explicitly set and the content type of the file is derived from the content (e.g. an XML file).

Returns:
the character encoding

setEncoding

void setEncoding(
String encoding)
Sets the character encoding to be used for reading and writing the buffer's underlying file.

Parameters:
encoding - the encoding

getAnnotationModel

IAnnotationModel getAnnotationModel()
Returns the annotation model of this text file buffer.

Returns:
the annotation model of this text file buffer, might be null if called when disconnected

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire